Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Help with Macro
You were right. had to put a wks.
And also end it with a Next wks Thankyou.... "Don Guillett" wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Search, Copy, Paste Macro in Excel | Excel Worksheet Functions | |||
Closing File Error | Excel Discussion (Misc queries) | |||
macro with F9 | Excel Discussion (Misc queries) | |||
Make Alignment options under format cells available as shortcut | Excel Discussion (Misc queries) | |||
Playing a macro from another workbook | Excel Discussion (Misc queries) |