Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting sheets in Excel VBA
If I select the first sheet in a workbook, hold shift and go to the
last sheet, all are selected for printing. However, when I record this function, the VBA code lists all sheets by name. For instance, If the workbook contains 'sheet1' 'sheet2' and 'sheet3' the macro code recorded = Sheets(Array("sheet1", "sheet2", "sheet3")).Select I would like to know if there is a way to select from sheet1 to sheet3 without explicitly naming them. The problem is that in the actual workbook, sometimes I add or delete sheets, and sometimes rename them for clarity. I don't want to have to modify the macro everytime I do that. Any help will be greatly appreciated. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Help with Macro in selecting sheets. | New Users to Excel | |||
selecting multiple sheets | Excel Worksheet Functions | |||
Selecting sheets - II | Excel Discussion (Misc queries) | |||
Selecting sheets | Excel Discussion (Misc queries) | |||
selecting sheets | Excel Programming |