D
Dennis
I have 10 sheets in a workbook. All sheets have random names in their tabs.
If I'm looking at one of the 10 sheets and I want to execute a macro on that
sheet what is the VBA code to find the name of the sheet I'm looking at?
Here is a snippet of code that will work for sheet #2 but if I'm not looking at
sheet(2) and I execute the macro how do I get the macro to execute on the sheet
I'm looking at?
OS = Sheets(2).Name
Set curwk = Sheets(OS)
Sheets(OS).Activate
With curwk
...
'''
Thanks in advance for any help.
Dennis
If I'm looking at one of the 10 sheets and I want to execute a macro on that
sheet what is the VBA code to find the name of the sheet I'm looking at?
Here is a snippet of code that will work for sheet #2 but if I'm not looking at
sheet(2) and I execute the macro how do I get the macro to execute on the sheet
I'm looking at?
OS = Sheets(2).Name
Set curwk = Sheets(OS)
Sheets(OS).Activate
With curwk
...
'''
Thanks in advance for any help.
Dennis