View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Frank Kabel Frank Kabel is offline
external usenet poster
 
Posts: 3,885
Default (Probably) simple question

Hi
try something like

sub foo()
Dim rng as range
set rng = Activecell
'...
'...your macro code
'...
rng.select
end sub

if you also change the worksheet and/or workbook you have to store them
in a similar way


--
Regards
Frank Kabel
Frankfurt, Germany

Jonathan Vickers wrote:
Hi,

I have a macro, but when it runs I want the cell that is selected
immediately afterwards to be the cell that was selected immediately
before the macro ran.

I am sure that this is quite an easy thing to do in VB, but I don't
know how to do it.

Any help is much appreciated,

Jon.