Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
joe joe is offline
external usenet poster
 
Posts: 62
Default a reminder, please - Range w/out qualified reference

If I see the following in a line of code

Range(rangeName) = Int(iValue

Can I assume that this refers to a range in the activesheet

Joe
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default a reminder, please - Range w/out qualified reference

Hi Joe
yes

--
Regards
Frank Kabel
Frankfurt, Germany

Joe wrote:
If I see the following in a line of code:

Range(rangeName) = Int(iValue)

Can I assume that this refers to a range in the activesheet?

Joe

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 253
Default a reminder, please - Range w/out qualified reference

Hi Joe,

Not always. If rangeName refers to a range NAME, it can be on another
worksheet.
If it is only a string variable which represent a range address, then we
assume it is in the
the active sheet.
Regards,

Jean-Yves


"Joe" wrote in message
...
If I see the following in a line of code:

Range(rangeName) = Int(iValue)

Can I assume that this refers to a range in the activesheet?

Joe



  #4   Report Post  
Posted to microsoft.public.excel.programming
joe joe is offline
external usenet poster
 
Posts: 62
Default a reminder, please - Range w/out qualified reference

Frank

Thank you

Joe
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 599
Default a reminder, please - Range w/out qualified reference

Joe

Also note that the default "roll-up" object is different in class modules
(e.g. ThisWorkbook, Sheet1, etc.) If you use an unqualified 'Range' in, for
example, the Worksheet_Change event for Sheet1, then it will roll-up to the
object represented by that class, namely Sheet1. Similarly, if you use
'Sheets("Sheet1")' in the Workbook_Open event (in the ThisWorkbook class
module), you will be referencing Sheet1 in ThisWorkbook, not in the
ActiveWorkbook. In standard modules, the roll-up object for an unqualified
Range is the activesheet and for an unqualified Sheets(x) is the Active
Workbook.

--
Dick Kusleika
MVP - Excel
www.dicks-clicks.com
Post all replies to the newsgroup.


"Jean-Yves" wrote in message
...
Hi Joe,

Not always. If rangeName refers to a range NAME, it can be on another
worksheet.
If it is only a string variable which represent a range address, then we
assume it is in the
the active sheet.
Regards,

Jean-Yves


"Joe" wrote in message
...
If I see the following in a line of code:

Range(rangeName) = Int(iValue)

Can I assume that this refers to a range in the activesheet?

Joe





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
automatic range - named range give me circular reference... George Thorogood Excel Discussion (Misc queries) 0 February 22nd 07 07:53 PM
Using a NAME as a reference in another range cdavidson Excel Discussion (Misc queries) 1 October 17th 05 04:31 PM
Bring Back Qualified Sum from another WB Excel Worksheet Functions 4 April 8th 05 01:01 AM
Range Reference Murray Taylor[_5_] Excel Programming 4 January 26th 04 09:47 AM
Subscript out of Range on Range reference Tom Ogilvy Excel Programming 0 September 13th 03 03:38 PM


All times are GMT +1. The time now is 04:43 AM.

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"