Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
a reminder, please - Range w/out qualified reference
Frank
Thank you Joe |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
automatic range - named range give me circular reference... | Excel Discussion (Misc queries) | |||
Using a NAME as a reference in another range | Excel Discussion (Misc queries) | |||
Bring Back Qualified Sum from another WB | Excel Worksheet Functions | |||
Range Reference | Excel Programming | |||
Subscript out of Range on Range reference | Excel Programming |