Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Print macro for multiple ranges/sheets
Hi Deeds
I'm unsure exactly what you are trying to do - if you are NOT attempting to print all the ranges to one sheet does this help? Sub Test() With Sheets("Sheet1").PageSetup ..PrintArea = "$B$5:$D$29,$E$42:$G$54,$H$14:$J$34,$M$16:$N$3 0" End With With Sheets("Sheet2").PageSetup ..PrintArea = "$C$10:$F$33,$I$5:$L$19,$H$36:$L$52" End With With Sheets("Sheet3").PageSetup ..PrintArea = "$B$6:$E$19,$H$14:$J$26" End With Sheets(Array("Sheet1", "Sheet2", "Sheet3")).PrintPreview ActiveSheet.Select End Sub If your print ranges are already defined you can reduce the above to..... Sub Test() Sheets(Array("Sheet1", "Sheet2", "Sheet3")).PrintPreview ActiveSheet.Select End Sub -- XL2002 Regards William "Deeds" wrote in message ... | I am trying to write a macro that prints/previews multiple ranges across several sheets. Any ideas? | Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
A macro code to print multiple sheets in different w.books | Excel Discussion (Misc queries) | |||
Protect but Allow Edit Ranges in Multiple Sheets | Excel Discussion (Misc queries) | |||
Setting multiple ranges to print | Excel Discussion (Misc queries) | |||
Multiple Print Ranges on one Worksheet | Excel Worksheet Functions | |||
Print macro for multiple ranges/sheets | Excel Programming |