markkramer
Board Regular
- Joined
- May 8, 2002
- Messages
- 162
I need to create a macro that loops through all the worksheets in a workbook. Each workbook will have an unknown number of worksheets and each worksheet will have an unknown name. The macro will need to:
1. Loop to the next worksheet
2. Open the worksheet (then I'll add code to do things in the worksheet)
3. Store the name of the worksheet in a variable
4. Repeat through all the worksheets
I know what to do once I get the worksheet open but I haven't figured out how to loop through each worksheet nor save the worksheet name in a variable.
Would appreciate help!
Thanks!
M
1. Loop to the next worksheet
2. Open the worksheet (then I'll add code to do things in the worksheet)
3. Store the name of the worksheet in a variable
4. Repeat through all the worksheets
I know what to do once I get the worksheet open but I haven't figured out how to loop through each worksheet nor save the worksheet name in a variable.
Would appreciate help!
Thanks!
M