View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default 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