Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 142
Default page setup in multiple worksheets

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default page setup in multiple worksheets

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default page setup in multiple worksheets

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 142
Default page setup in multiple worksheets

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 142
Default page setup in multiple worksheets

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I get the Page Setup to apply to all the worksheets? Colette Excel Discussion (Misc queries) 1 February 7th 08 08:22 PM
Copy "Page Setup" for multiple worksheets of identical size. BrotherBax Excel Discussion (Misc queries) 1 August 30th 07 04:12 PM
changing the page setup for multiple worksheets in a workbook Joe Skochdopole Excel Discussion (Misc queries) 3 March 7th 06 04:52 PM
Page Setup Across Multiple Worksheets Mike Excel Worksheet Functions 0 February 9th 06 06:31 PM
Page Setup for multiple worksheets macro problem KonaAl Excel Discussion (Misc queries) 3 January 7th 06 02:33 AM


All times are GMT +1. The time now is 04:17 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"