E
Ed Lisay
Richard,
Sounds like you want the code to run based on the
Worksheet that is currently active.
I do this all the time. Try this:
1. Take the code out of the Worksheet and put it in a
Module.
T
2. hen add this at the beginning:
mySheetName = ActiveCell.Worksheet.Name
3. Then find all the places in the existing code where
the name of a worksheet is hardcoded in and replace then
with:
mySheetName
4. Then from each command button click event, just call
the code.
Please let me know if you have any questions,
Ed
Sounds like you want the code to run based on the
Worksheet that is currently active.
I do this all the time. Try this:
1. Take the code out of the Worksheet and put it in a
Module.
T
2. hen add this at the beginning:
mySheetName = ActiveCell.Worksheet.Name
3. Then find all the places in the existing code where
the name of a worksheet is hardcoded in and replace then
with:
mySheetName
4. Then from each command button click event, just call
the code.
Please let me know if you have any questions,
Ed