Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 72
Default Page Formating & Macros

Brad,

Try using something like:

For each Ws in ActiveWorkbook.Worksheets
With Ws
'adjust margins here
End With
Next Ws


HTH
Henry

"Brad" wrote in message
...
Hello~

I am trying to write a macro that sets the page margins
for all sheets in a workbook. Manually, if you select all
of the sheets in a workbook, then change the margins, all
the sheets change. When I run the macro, only one sheet
changes. I am using Worksheets.Select to select all
sheets, because the number & names of the sheets varies
depending on which program runs this macro. Any idea why
this works manually, but not via macro?



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
Conditional Formating and Macros Les Excel Discussion (Misc queries) 0 February 18th 10 08:20 PM
can macros include page setup functions? junebug Excel Discussion (Misc queries) 1 September 4th 08 04:15 PM
Macros to Pull Errors to Top of the Page Daren Excel Worksheet Functions 3 August 2nd 07 06:28 PM
Formating text columns layout with page breaks in Excel 97 Shayne T. New Users to Excel 2 February 2nd 07 02:53 AM
macros on one page frendabrenda1 Excel Discussion (Misc queries) 1 October 24th 05 12:18 PM


All times are GMT +1. The time now is 01:06 AM.

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

About Us

"It's about Microsoft Excel"