Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default retain Selection

If you're changing workbooks and or worksheets, you'll have to activate those
first.

savesel.parent.parent.activate 'activate the workbook
savesel.parent.select 'select the worksheet
savesel.select 'select the range

or you could use:

application.goto savesel, scroll:=true 'or false???



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?


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
De-dup and retain new records only jaltsman Excel Worksheet Functions 0 June 13th 08 03:11 AM
Copy Selection - Paste Selection - Delete Selection Uninvisible Excel Programming 2 October 25th 07 01:31 PM
Copy Selection - Transpose Selection - Delete Selection Uninvisible Excel Discussion (Misc queries) 2 October 23rd 07 04:18 PM
Formula should retain T De Villiers[_29_] Excel Programming 7 July 6th 06 02:21 PM
Retain, restore selection? Mekratrig Excel Programming 4 July 14th 04 05:09 PM


All times are GMT +1. The time now is 07:15 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"