View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson Jim Thomlinson is offline
external usenet poster
 
Posts: 5,939
Default Set active sheet

You are best off not to select sheets as you go but that takes a bit of
understanding how the excel objects model works... A quick way would be to
add some code around your routine something like this...

Sub DoSomeStuff
dim wks as worksheet

set wks = activesheet
'Do your stuff here...

wks.select
set wks = nothing
end sub
--
HTH...

Jim Thomlinson


"Patrick Simonds" wrote:

How do you set the current worksheet as the activesheet so that when a
routine ends you are back to the worksheet you started in.