View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
MikeF[_2_] MikeF[_2_] is offline
external usenet poster
 
Posts: 173
Default select all sheets?

Thanx Spencer.
I am actually using 4 of the six available headers/footers on each page.
What's the best "with/endwith" stmt to use in conjunction with your code?

- Mike


"Spencer" wrote:

no need to select.

Dim sht As Worksheet
For Each sht In ActiveWorkbook.Worksheets
sht.PageSetup.LeftHeader = "HEADER TEXT")
Next sht

"MikeF" wrote:

I have a small macro that reworks the headers and footers in Excel.
But it works only on the active sheet.

What code can I put before it to "select all sheets" in the workbook?

Thanx,
- Mike