View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Josh Sale Josh Sale is offline
external usenet poster
 
Posts: 177
Default Setting PageSetup Properties in Multiple Worksheets

Right now my VBA code creates a number of worksheets and then sets a bunch
of their PageSetup properties.

Because PageSetup can be so slow, I would like to set all of the properties
at once. I tried:

With Sheets(Array("Sheet2", "Sheet1")).PageSetup
.LeftHeader = "foo"
...
End With

But I get a run-time error on the With statement (438 Object doesn't support
this property or method).

Is there some other way to accomplish this or to dynamically (and
temporarily) define what the default PageSetup properties should be for
newly added worksheets?

TIA,

josh