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?
|