A friend is creating a macro that performs certain tasks on each worksheet tab in the workbook. The tab name will be 5-7 digit numbers randomly assigned by the user. The macro needs to do is something like:
Sheet1.Activate
Code……….
Sheet2.Activate
Etc.
If tab1 name is (for instance) 12345 and tab 2 is 4567801, will referring to them as sheet1, sheet2 work? Ideally, the macro should start with the first tab, perfom the code, select NEXT TAB, perform the code, etc. until there are no more tabs left.
Can someone put us on the right track for:
1. Selecting sheets without calling them by the name the user assigns to it AND
2. Looping the macro until there are no more tabs?
TIA