Thread: Help with Macro
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Don Guillett
 
Posts: n/a
Default Help with Macro

a brief look suggests


-- If WS. PageSetup.PaperSize = A3 Then
Don Guillett
SalesAid Software

"Rajula" wrote in message
...
I have used the following macro. The logic goes like this
If the paper size selected is A3, then print page 1 of every sheet,
If paper size selected is A4, then print page 1 & 2 of every sheet.

Its giving an error for .PageSetup.. What is wrong with the macro??

For Each wks In ActiveWorkbook.Worksheets
If .PageSetup.PaperSize = A3 Then
wks.PrintOut from:=1, to:=1, preview:=True
Else
wks.PrintOut from:=1, to:=2, preview:=True