use vaiable for all sheets
If you change this line:
msgbox dest.address
to
msgbox dest.address(external:=true)
You'll see the fully qualified address. It may be a nice way of debugging
problems.
"R..VENKATARAMAN" wrote:
the following is a trivial example
dim sub test{}
dim dest as range
set dest=range("a1").end(xldown)
with workshees("sheet3")
msgbox dest.address
end with
with worksheets("sheet2")
msgbox dest.address
end iwth
end sub
will the first msgbox show the last cell in sheet 3 column A and second box
show the corresponding cell in sheet 2 even though neither of these sheets
are active sheets
or
am I to wrie a line activating the sheet each time and then write msgbox
line.
I hope I am clear.
thanks.
.
--
Dave Peterson
|