LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Am I Range? ... I object!!!

Look... I need some help understanding something. I know with your wisdom,
you will be able to get this through my thick skull.

What really is the difference between thse declarations:

Dim Var as Range
Dim Var as Object

When I think of a range... I think of a range object. The key word being
"object".

The reason I bring up this confusion, mainly, is that if I set a range
variable to a range, that " RangeValue", doesn't carry with it all the
properties of where it came from.

Condider this: sheet1 is active

Set MyRange = Range("A2").CurrentRegion

MyRange is no a "range" object which points to the curren region connected
to cell A1 on Sheet1

What if I want to set MyRange to a region on another sheet??? The following
is not valid code:

Set MyRange = sheets("Sheet3").Range("A1").CurrentRegion

Is this where an "Object" variable come into play?

I realize that I can use:

MyRange = MyOtherRange.address(external:=True)

to get the full reference, but this does return a string variable... not a
range

Can someone Plleeease help me to understand this.

John


 
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
Working with the range object [email protected] Excel Discussion (Misc queries) 1 November 26th 07 04:29 PM
Excel Addin:Setting the range to the Excel.Range object range prop Rp007 Excel Worksheet Functions 5 November 24th 06 04:30 PM
Range object to Array object conversion Myrna Larson[_2_] Excel Programming 1 August 1st 03 02:27 AM
Range object to Array object conversion Alan Beban[_3_] Excel Programming 0 August 1st 03 01:24 AM
Range object to Array object conversion Tom Ogilvy Excel Programming 0 August 1st 03 12:16 AM


All times are GMT +1. The time now is 05: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"