Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Undo a select operation?

8 views
Skip to first unread message

Robert Crandal

unread,
May 13, 2013, 4:07:26 PM5/13/13
to
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?


Robert Crandal

unread,
May 13, 2013, 4:26:45 PM5/13/13
to
"Robert Crandal" <rcranz...@gmail.com> wrote
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???

Claus Busch

unread,
May 13, 2013, 4:31:47 PM5/13/13
to
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

Robert Crandal

unread,
May 13, 2013, 4:52:03 PM5/13/13
to
"Claus Busch" <claus...@t-online.de> 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?



Claus Busch

unread,
May 13, 2013, 4:58:41 PM5/13/13
to
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.

joeu2004

unread,
May 13, 2013, 5:20:52 PM5/13/13
to
"Robert Crandal" <rcranz...@gmail.com> 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

0 new messages