Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Determining the Selection on a non-active Sheet?

Hi,

Is there a way to determine the range of cells that have
been selected on "another" sheet, without first activating
it? I want to be able to say something like:

Dim theSel as Range
Set theSel = Worksheets("A nonactive sheet").Selection

but this obviously fails. Any way to accomplish the
equivalent without activating or selecting that other
sheet?

Thanks,
Jim S.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Determining the Selection on a non-active Sheet?

Hi Jim
AFAIK you have to activate/select the sheet first. You may hide this
with diaabling the screenupdating

--
Regards
Frank Kabel
Frankfurt, Germany


Jim S. wrote:
Hi,

Is there a way to determine the range of cells that have
been selected on "another" sheet, without first activating
it? I want to be able to say something like:

Dim theSel as Range
Set theSel = Worksheets("A nonactive sheet").Selection

but this obviously fails. Any way to accomplish the
equivalent without activating or selecting that other
sheet?

Thanks,
Jim S.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Determining the Selection on a non-active Sheet?

If you look at VBA's help for Selection, you'll see that it applies to the
application or window object.

You'll have to go through one of them to get it.

MsgBox Windows(1).Selection.Address & "--" & Windows(1).Caption
MsgBox Windows(2).Selection.Address & "--" & Windows(2).Caption

"Jim S." wrote:

Hi,

Is there a way to determine the range of cells that have
been selected on "another" sheet, without first activating
it? I want to be able to say something like:

Dim theSel as Range
Set theSel = Worksheets("A nonactive sheet").Selection

but this obviously fails. Any way to accomplish the
equivalent without activating or selecting that other
sheet?

Thanks,
Jim S.


--

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
Selection starting from active cell Ronald Dodge Excel Discussion (Misc queries) 3 October 10th 06 12:46 AM
Active range/selection? anita Excel Worksheet Functions 9 September 20th 06 01:35 PM
Determining active conditional format of one cell Antonio[_3_] Excel Programming 1 November 27th 03 12:38 AM
Determining Active Row Number Don Guillett[_4_] Excel Programming 0 August 20th 03 11:04 PM
Determining Active Row Number Scott Patrias Excel Programming 0 August 20th 03 09:14 PM


All times are GMT +1. The time now is 02:09 PM.

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

About Us

"It's about Microsoft Excel"