Range object
If you are wanting to refer to the same range of cell
addresses regardless of which sheet, I think your best bet
would be to declare the cell range as a string, like:
Public MyRange as String
Then in a procedu
MyRange = "A1:A100"
ThisWorkbook.Worksheets(SheetOfMyChoice).Range(MyR ange)
You could also use a constant so you don't have to keep
assigning the string.
Public Const MyRange as String = "A1:A100"
Now MyRange will always = "A1:A100"
tod
-----Original Message-----
Does anyone know if the range object is declared global
by
default. that is, could I cuse the range from any where
in
the workbook without keep switching to the worksheet that
the named range is located.
For example is I name a range MyRange on sheet1 could I
address that MyRange while performing some operation on
sheet2?
I hope I presented my question in an understandable
format.
Thanks
Desmond
.
|