View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Macro for hiding and printing.

Like this?

Option Explicit
Sub testme()

Dim wks As Worksheet

For Each wks In ActiveWorkbook.Worksheets
wks.Range("w:ac").EntireColumn.Hidden = True
Next wks

ActiveWorkbook.PrintOut preview:=True 'save paper for testing

For Each wks In ActiveWorkbook.Worksheets
wks.Range("w:ac").EntireColumn.Hidden = False
Next wks

End Sub



Olle Svensson wrote:

Hi.
I want to put in a macro that simply hides columns W-AC in all sheets and
then prints the entire workbook. Sounds rather easy but being a rookie at
macros, I can not do it myself.

Therefore, I hope someone might be able to throw something together for me,
please?

Kind regards,
Olle Svensson


--

Dave Peterson