For the OP
See also this code from John Green for faster code
http://www.mcgimpsey.com/excel/udfs/pagesetup.html
--
Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm
"Dave Peterson" wrote in message ...
Dim wks as worksheet
for each wks in activewindow.selected sheets
wks.activate
your code here
next wks
or
Dim wks as worksheet
for each wks in activeworkbook.worksheets 'to get all the sheets
wks.activate
your code here
next wks
Ross wrote:
Please help,
I am formatting each page to print using vba and it is very cool but slow
with 75 tabs / pages to format.
I can select all tabs (with vba) and manually format all selected tabs but
my "With Reference" only allows 1 tab / Page.
How can I do all the pages (.PageSetup) with one pass?
My Code:
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = "&A"
.
.
.
.
.etc
What should I change "With ActiveSheet.PageSetup" to so that it can deal
with ALL SELECTED SHEETS instead of doing just one sheet even though all are
selected?
Many Thanks
Ross
--
Dave Peterson