I setup a "Name" to a column range, and I want to reference it later on:
Dim r As Range
r = Application.Names("Changes").Something
I've tried a bunch of "Something" but cannot get this right. Thanks.
I setup a "Name" to a column range, and I want to reference it later on:
Dim r As Range
r = Application.Names("Changes").Something
I've tried a bunch of "Something" but cannot get this right. Thanks.
does this work?
Dim R As Range
Set R = ThisWorkbook.Names("Changes").RefersToRange
I think it will only work if the range is 2 cells or more. If it is one you have to do something else...don't really remember though.
Another way is as follows.
Sheets("Name").Range("Changes")
dim r as Range
Set r = Range("Changes")
The 'Set' keyword is very important.
This will work for any size range, including a single cell.
Then you can access the properties and methods of your range variable 'r'.