D
Dave rey
Hi
I have a workbook with 70 sheets named Sheet1 to Sheet70,
and I am trying to write some code into a macro to allow
me to select (say) only Sheets 15 to 40.
I am trying to write code in the following format, but
struggling:
Sheets ("Sheet15" to "Sheet40").Select
Or in another case:
Sheets("Sheet15 to "last sheet").Select - where last sheet
could be any sheet depending on how many I add or delete
in the middle.
If I try to record a macro by selecting the sheets it uses
the array command, but lists each sheet in the range by
name. This is no good as I am continually adding and
removing sheets.
Thanks
I have a workbook with 70 sheets named Sheet1 to Sheet70,
and I am trying to write some code into a macro to allow
me to select (say) only Sheets 15 to 40.
I am trying to write code in the following format, but
struggling:
Sheets ("Sheet15" to "Sheet40").Select
Or in another case:
Sheets("Sheet15 to "last sheet").Select - where last sheet
could be any sheet depending on how many I add or delete
in the middle.
If I try to record a macro by selecting the sheets it uses
the array command, but lists each sheet in the range by
name. This is no good as I am continually adding and
removing sheets.
Thanks