D
Dave Rey
I have a workbook containing many worksheets.
I am trying to write a macro which will select all
sheets. When I record a macro, the code looks like this:
"ActiveWindow.ScrollWorkbookTabs Position:=xlLast
Sheets(Array
("Sheet1", "sheet2", "sheet3","sheetn")).Select"
Where each sheet has a different name (not shown above)
and sheetn is the name of the last sheet.
Is there any way of achieveing the same as above, but with
the array being from "first sheet in book" to "last sheet
in book" - thereby enabling me to add sheets, rename them
etc and the macro automatically include the new ones?
Thanks
Dave
I am trying to write a macro which will select all
sheets. When I record a macro, the code looks like this:
"ActiveWindow.ScrollWorkbookTabs Position:=xlLast
Sheets(Array
("Sheet1", "sheet2", "sheet3","sheetn")).Select"
Where each sheet has a different name (not shown above)
and sheetn is the name of the last sheet.
Is there any way of achieveing the same as above, but with
the array being from "first sheet in book" to "last sheet
in book" - thereby enabling me to add sheets, rename them
etc and the macro automatically include the new ones?
Thanks
Dave