How to Select All sheets

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Greetings All!

Simple I'm sure but not obvious:

Every month I generate a group of worksheets that will vary in name and
number.

What is the code to select all of the worksheets so that I can apply a
consistent page setup?

(The only examples I have been able to locate always specify worksheet names.)

Then, with the entire workbook selected, I want to select all cells to apply
consistent formatting.

Thanks in advance!
 
Try this...

Sub SelectAllSheets()
Dim wks As Worksheet

For Each wks In Worksheets
wks.Select False
Next wks
End Sub
 
Thanks Jim-I'll try it!
--
Dawn Bjork Buzbee


Jim Thomlinson said:
Try this...

Sub SelectAllSheets()
Dim wks As Worksheet

For Each wks In Worksheets
wks.Select False
Next wks
End Sub
 
Back
Top