Is there a way to refer to a worksheet named range without activating the sheet?
I have various sheets with ranges of the same name, and I would like to refer to the ranges in vba. I would expect something like Sheet2.Range("RangeName")
to work, but that only works when Sheet2
is activated.
The only other way I can think of is through Range(Sheet2.Name & "!" & "RangeName")
, but that only seems to work when Sheet2.Name
doesn't contain spaces.
Do I need to stick to the activation of the sheets (which I like to prevent) or is there another way to refer to the range?
I am working with Excel 2016. Help is much appreciated.