Help with Macro

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
a brief look suggests


-- If WS. PageSetup.PaperSize = A3 Then
Don Guillett
SalesAid Software
(e-mail address removed)
 
You were right. had to put a wks.
And also end it with a Next wks

Thankyou....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top