Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 158
Default Undo a select operation?

This might be a dumb question, but here goes....

If I run this code:

Range("A12:M2").Select

is there a command that will "undo" or cancel the
selected region?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 158
Default Undo a select operation?

"Robert Crandal" wrote

This might be a dumb question, but here goes....

If I run this code:

Range("A12:M2").Select

is there a command that will "undo" or cancel the
selected region?


My question might have been misworded, so I want to rephrase....

I'm not really looking for an "undo" command. I guess what I
would like to do is "turn off" the selected or highlighted region.
I thought maybe there would be an "Unselect" command, but
I guess not.

Maybe the best thing to do is select a singe cell, such as
Range("A1").Select???
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,872
Default Undo a select operation?

Hi Robert,

Am Mon, 13 May 2013 13:26:45 -0700 schrieb Robert Crandal:

Maybe the best thing to do is select a singe cell, such as
Range("A1").Select???


in this case you have to select another cell or another range.

What do you want to do? If you refer correctly, you don't have to use
select.


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 158
Default Undo a select operation?

"Claus Busch" wrote
Hi Robert,

in this case you have to select another cell or another range.

What do you want to do? If you refer correctly, you don't have to use
select.


My workbook is locked to prevent users from editing data.
The workbook also contains a couple hundred rows of data.

Using VBA, my plan is to scroll down to one particular row
and highlight it using the "Select" function. This is only for the
purpose of making that row easiliy visible, not for the purpose
of a copy or delete operation, etc..

So, my only plan was to scroll down and make a row easily
visible, then turn off the highlight once done. It looks like
all I need to do is select another cell or range, right?



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,872
Default Undo a select operation?

Hi Robert,

Am Mon, 13 May 2013 13:52:03 -0700 schrieb Robert Crandal:

So, my only plan was to scroll down and make a row easily
visible, then turn off the highlight once done. It looks like
all I need to do is select another cell or range, right?


you must not scroll down. The selected range comes in the window.
And selecting another cell will turn off the border.


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 829
Default Undo a select operation?

"Robert Crandal" wrote:
If I run this code: Range("A12:M2").Select
is there a command that will "undo" or cancel the
selected region?


I'm not really looking for an "undo" command. I guess
what I would like to do is "turn off" the selected or
highlighted region. I thought maybe there would be an
"Unselect" command, but I guess not.
Maybe the best thing to do is select a singe cell, such
as Range("A1").Select???


Exactly right. Something must always be selected.

Alternatively, to "undo" as you requested; that is, to revert to the
previous selection:

Dim oldSelection As Range
Set oldSelection = Selection
Range("A2:M12").Select
..... some time later ....
oldSelection.Select

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
Change cut/paste operation to cut/insert operation Don Guillett Excel Programming 0 January 17th 07 03:23 PM
what does $ operation mean JO New Users to Excel 1 December 15th 05 11:42 PM
UNDO - how many times can I UNDO? Jane Excel Worksheet Functions 2 May 19th 05 03:03 AM
Conditional operation Shetty Excel Worksheet Functions 1 January 17th 05 01:08 PM
Why is my undo function in Excel only can undo the last 1 or 2 ch. 1111111111111111111111111111111111111111 Excel Worksheet Functions 1 November 24th 04 11:13 AM


All times are GMT +1. The time now is 01:49 AM.

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"