#1   Report Post  
Posted to microsoft.public.excel.misc
Rajula
 
Posts: n/a
Default Help with Macro

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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Search, Copy, Paste Macro in Excel [email protected] Excel Worksheet Functions 0 January 3rd 06 06:51 PM
Closing File Error jcliquidtension Excel Discussion (Misc queries) 4 October 20th 05 12:22 PM
macro with F9 Kenny Excel Discussion (Misc queries) 1 August 3rd 05 02:41 PM
Make Alignment options under format cells available as shortcut dforrest Excel Discussion (Misc queries) 1 July 14th 05 10:58 PM
Playing a macro from another workbook Jim Excel Discussion (Misc queries) 1 February 23rd 05 10:12 PM


All times are GMT +1. The time now is 07:05 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"