Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Relative return to original worksheet in middle of macro
Hi -
I'm making a macro that is used for many workbooks that will all have a different worksheet names (sheet, sheet2, etc...). The macro creates two new worksheets then it needs to return to the original worksheet to perform an action. So right in the middle of the macro, it needs to return to the original worksheet but that worksheet will always have a different name - is there anyway to do that? I couldn't find it or figure it out - I thought there was just some easy command, maybe? Thanks A |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Relative return to original worksheet in middle of macro
Dim sh as Worksheet
set sh = Activesheet . . . ' now return to original sheet sh.Activate -- Regards, Tom Ogilvy " wrote: Hi - I'm making a macro that is used for many workbooks that will all have a different worksheet names (sheet, sheet2, etc...). The macro creates two new worksheets then it needs to return to the original worksheet to perform an action. So right in the middle of the macro, it needs to return to the original worksheet but that worksheet will always have a different name - is there anyway to do that? I couldn't find it or figure it out - I thought there was just some easy command, maybe? Thanks A |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Relative return to original worksheet in middle of macro
Thanks much.
Tom Ogilvy wrote: Dim sh as Worksheet set sh = Activesheet . . . ' now return to original sheet sh.Activate -- Regards, Tom Ogilvy " wrote: Hi - I'm making a macro that is used for many workbooks that will all have a different worksheet names (sheet, sheet2, etc...). The macro creates two new worksheets then it needs to return to the original worksheet to perform an action. So right in the middle of the macro, it needs to return to the original worksheet but that worksheet will always have a different name - is there anyway to do that? I couldn't find it or figure it out - I thought there was just some easy command, maybe? Thanks A |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro to return to original cell | Excel Discussion (Misc queries) | |||
How write Macro to save worksheet to a RELATIVE address | Excel Discussion (Misc queries) | |||
Hyperlink to web does not return to original Excel worksheet | Excel Discussion (Misc queries) | |||
Copying formulas (relative) give always original value | Excel Worksheet Functions | |||
How to insert carriage return in the middle of a text formula to . | Excel Discussion (Misc queries) |