A
Arne Hegefors
I search parts of a spreadsheet for certain words etc. My code looks like:
Set searchRange = Range(Cells(rng5.Row, 1), Cells(rng5.Row, 100))
Set rng2 = Worksheets("Beräkning").Range(searchRange.Address).Find("Date",
LookIn:=xlValues)
and this works fine. I just wonder is it not possible to write the code in a
shorter way by writing something like eg.
Set rng2 = Worksheets("Beräkning").searchRange.Find("Date", LookIn:=xlValues)
It does not work for me when I write it like that. what am i doing wrong?
Thanks
Set searchRange = Range(Cells(rng5.Row, 1), Cells(rng5.Row, 100))
Set rng2 = Worksheets("Beräkning").Range(searchRange.Address).Find("Date",
LookIn:=xlValues)
and this works fine. I just wonder is it not possible to write the code in a
shorter way by writing something like eg.
Set rng2 = Worksheets("Beräkning").searchRange.Find("Date", LookIn:=xlValues)
It does not work for me when I write it like that. what am i doing wrong?
Thanks