View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default retain Selection

It should work exactly as you have coded it. If, however, you are navigating
between workbook/worksheets then save that information as well.
--
Gary''s Student - gsnu200785


"DrFear" wrote:

I'm trying to restore the Selection that was in place at the time I started a
routine that changes the selection during its run. In other words I want
something like

dim saveSel as Range
Set saveSel = Application.Selection

... do stuff that destroys the current selection then

saveSel.Select

And the problem with this is of course that the object to which saveSel
refers has been destroyed in the meantime. What I actually want is to have
saveSel be a range (or ref to a range) of cells that is set to whatever was
selected originally.

Any ideas?