Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
For Each sht In Sheets
With sht.PageSetup .Orientation = xlLandscape .Zoom = 58 End With End Sub "Jerry" wrote: 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. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 Jerry wrote: 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. -- Dave Peterson |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Joel, couple of minor changes and is working like a charm.
"Joel" wrote: For Each sht In Sheets With sht.PageSetup .Orientation = xlLandscape .Zoom = 58 End With End Sub "Jerry" wrote: 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. |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I tried both approaches and I see your point of using one or the other.
Either way both of have have been helpful. "Dave Peterson" wrote: 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 Jerry wrote: 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. -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I get the Page Setup to apply to all the worksheets? | Excel Discussion (Misc queries) | |||
Copy "Page Setup" for multiple worksheets of identical size. | Excel Discussion (Misc queries) | |||
changing the page setup for multiple worksheets in a workbook | Excel Discussion (Misc queries) | |||
Page Setup Across Multiple Worksheets | Excel Worksheet Functions | |||
Page Setup for multiple worksheets macro problem | Excel Discussion (Misc queries) |