page setup in multiple worksheets

J

Jerry

I have a worksheet with about 70 tabs. Each tab is labeled with last names.
I want to change the page setup for all of them tothe following settings:
Landscape, 58% fitting and zero margins al around. I setup a macro but that
means I have to go to each tab and execute it, is there a way to automate the
process to run it for all tabs instead of one by one? Thanks in advance.
 
J

Joel

For Each sht In Sheets
With sht.PageSetup
.Orientation = xlLandscape
.Zoom = 58
End With
End Sub
 
D

Dave Peterson

Do you have to use a macro?

There are lots of page setup settings that you can change with the worksheets
grouped that will change each of the sheets.

Rightclick on any tab and select Select all sheets.
change the settings
rightclick and ungroup the sheets

Almost any change you make to the activesheet in that group will be reflected on
the other sheets--so it can be dangerous!

If you have to use a macro, I'd still loop through them:

Dim wks as worksheet
for each wks in activeworkbook.worksheets
wks.select
'your code here
next wks
 
J

Jerry

I tried both approaches and I see your point of using one or the other.
Either way both of have have been helpful.
 

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

Top