![]() |
How to Select All sheets
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! -- Dawn Bjork Buzbee |
How to Select All sheets
Try this...
Sub SelectAllSheets() Dim wks As Worksheet For Each wks In Worksheets wks.Select False Next wks End Sub -- HTH... Jim Thomlinson "Dawn Bjork Buzbee" wrote: 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! -- Dawn Bjork Buzbee |
How to Select All sheets
Thanks Jim-I'll try it!
-- Dawn Bjork Buzbee "Jim Thomlinson" wrote: Try this... Sub SelectAllSheets() Dim wks As Worksheet For Each wks In Worksheets wks.Select False Next wks End Sub -- HTH... Jim Thomlinson "Dawn Bjork Buzbee" wrote: 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! -- Dawn Bjork Buzbee |
All times are GMT +1. The time now is 10:11 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com