using alise
To assign and object to a variable, you must use the Set keyword.
Set str = Workbooks(1).Sheets(1).Cells(RR, 1)
If you are trying to make the variable apply to a string located in that
cell, then:
str = Workbooks(1).Sheets(1).Cells(RR, 1).Value
"OlieH" wrote:
to shorten code, I wish to declare
str = Workbooks(1).sheets(1).cells(RR,1)
as an alias so that each time I
need to reference that cell I could use an aliase
in stead of workbooks(1).sheets(1).cell(RR,1) = "a"
I could just use str = "a"
Thank you very much for any help.
|