How would I select all the worksheets in a workbook without knowing how many worksheets a workbook contained and without using the worksheet names specifically.
The macro recorder gives me this:
Sheets(Array("Mesa 8D2-21 S4", "Mesa 8D2-21 S1", "Mesa 8D2-21 S2","Mesa 8D2-21 S3", "Sheet1")).Select
But I need to use something more generic.
I can get the number of worksheets from:
shtCount = ActiveWorkbook.Worksheets.Count
I know they have index numbers but I don't know the proper syntax.
How would I reference them in an array such as from
1 to shtcount
I don't need to loop through them just select them all without knowing the names.
The macro recorder gives me this:
Sheets(Array("Mesa 8D2-21 S4", "Mesa 8D2-21 S1", "Mesa 8D2-21 S2","Mesa 8D2-21 S3", "Sheet1")).Select
But I need to use something more generic.
I can get the number of worksheets from:
shtCount = ActiveWorkbook.Worksheets.Count
I know they have index numbers but I don't know the proper syntax.
How would I reference them in an array such as from
1 to shtcount
I don't need to loop through them just select them all without knowing the names.