Advertisement
Guest User

Untitled

a guest
Oct 27th, 2016
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.97 KB | None | 0 0
  1. .EnableEvents = False
  2.  
  3. .Calculation = xlCalculationManual
  4.  
  5. .ScreenUpdating = False
  6.  
  7. For i = 1 To 12
  8.  
  9. If UCase(MonthName(i)) = UCase(Target.Value) Then
  10.  
  11. Columns(i + 2).Hidden = False
  12.  
  13. Exit For
  14.  
  15. End If
  16.  
  17. Next
  18.  
  19. .ScreenUpdating = True
  20.  
  21. .Calculation = xlCalculationAutomatic
  22.  
  23. .EnableEvents = True
  24.  
  25. .EnableEvents = False
  26.  
  27. .Calculation = xlCalculationManual
  28.  
  29. .ScreenUpdating = False
  30.  
  31. ActiveWorkbook.Save
  32.  
  33. .ScreenUpdating = True
  34.  
  35. .Calculation = xlCalculationAutomatic
  36.  
  37. .EnableEvents = True
  38.  
  39. .EnableEvents = False
  40.  
  41. .Calculation = xlCalculationManual
  42.  
  43. .ScreenUpdating = False
  44.  
  45. Columns("a:sb").Select
  46.  
  47. Range("F:AH,AL:SA").Select
  48.  
  49. Selection.EntireColumn.Hidden = True
  50.  
  51. Application.Visible = True
  52.  
  53. .ScreenUpdating = True
  54.  
  55. .Calculation = xlCalculationAutomatic
  56.  
  57. .EnableEvents = True
  58.  
  59. .EnableEvents = False
  60.  
  61. .Calculation = xlCalculationManual
  62.  
  63. .ScreenUpdating = False
  64.  
  65. Columns("a:sb").Select
  66.  
  67. Selection.EntireColumn.Hidden = False
  68.  
  69. Range("B:E,G:U,X:AM,AP:AP,AR:SA").Select
  70.  
  71. Selection.EntireColumn.Hidden = True
  72.  
  73. Application.Visible = True
  74.  
  75. .ScreenUpdating = True
  76.  
  77. .Calculation = xlCalculationAutomatic
  78.  
  79. .EnableEvents = True
  80.  
  81. .EnableEvents = False
  82.  
  83. .Calculation = xlCalculationManual
  84.  
  85. .ScreenUpdating = False
  86.  
  87. .ScreenUpdating = True
  88.  
  89. .Calculation = xlCalculationAutomatic
  90.  
  91. .EnableEvents = True
  92.  
  93. .EnableEvents = False
  94.  
  95. .Calculation = xlCalculationManual
  96.  
  97. .ScreenUpdating = False
  98.  
  99. Columns("a:sb").Select
  100.  
  101. Selection.EntireColumn.Hidden = False
  102.  
  103. Columns("J:SA").Select
  104.  
  105. Selection.EntireColumn.Hidden = True
  106.  
  107. Application.Visible = True
  108.  
  109. .ScreenUpdating = True
  110.  
  111. .Calculation = xlCalculationAutomatic
  112.  
  113. .EnableEvents = True
  114.  
  115. .EnableEvents = False
  116.  
  117. .Calculation = xlCalculationManual
  118.  
  119. .ScreenUpdating = False
  120.  
  121. Columns("a:sb").Select
  122.  
  123. Range("F:K,O:SA").Select
  124.  
  125. Selection.EntireColumn.Hidden = True
  126.  
  127. Application.Visible = True
  128.  
  129. .ScreenUpdating = True
  130.  
  131. .Calculation = xlCalculationAutomatic
  132.  
  133. .EnableEvents = True
  134.  
  135. .EnableEvents = False
  136.  
  137. .Calculation = xlCalculationManual
  138.  
  139. .ScreenUpdating = False
  140.  
  141. Columns("a:sb").Select
  142.  
  143. .ScreenUpdating = True
  144.  
  145. .Calculation = xlCalculationAutomatic
  146.  
  147. .EnableEvents = True
  148.  
  149. .EnableEvents = False
  150.  
  151. .Calculation = xlCalculationManual
  152.  
  153. .ScreenUpdating = False
  154.  
  155. Columns("a:sb").Select
  156.  
  157. Range("B:E,G:U,Y:SA").Select
  158.  
  159. Selection.EntireColumn.Hidden = True
  160.  
  161. Application.Visible = True
  162.  
  163. .ScreenUpdating = True
  164.  
  165. .Calculation = xlCalculationAutomatic
  166.  
  167. .EnableEvents = True
  168.  
  169. .EnableEvents = False
  170.  
  171. .Calculation = xlCalculationManual
  172.  
  173. .ScreenUpdating = False
  174.  
  175. Columns("a:sb").Select
  176.  
  177. Range("AB1").Activate
  178.  
  179. Selection.EntireColumn.Hidden = True
  180.  
  181. Application.Visible = True
  182.  
  183. .ScreenUpdating = True
  184.  
  185. .Calculation = xlCalculationAutomatic
  186.  
  187. .EnableEvents = True
  188.  
  189. .EnableEvents = False
  190.  
  191. .Calculation = xlCalculationManual
  192.  
  193. .ScreenUpdating = False
  194.  
  195. Columns("a:sb").Select
  196.  
  197. Range("F:AC,AG:SA").Select
  198.  
  199. Selection.EntireColumn.Hidden = True
  200.  
  201. Application.Visible = True
  202.  
  203. .ScreenUpdating = True
  204.  
  205. .Calculation = xlCalculationAutomatic
  206.  
  207. .EnableEvents = True
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement