I have a Define Name variable in one of my worksheets. It's called Cur_Month. I want to use it in my VBA procedure. I tried to use something like
i = Cur_Month
but it did not recognize Cur_Month.
Thanks.
I have a Define Name variable in one of my worksheets. It's called Cur_Month. I want to use it in my VBA procedure. I tried to use something like
i = Cur_Month
but it did not recognize Cur_Month.
Thanks.
Use:
If the scope of the named range is limited to a single worksheet, you'll have to qualify the range with the appropriate worksheet - e.g.:i = Range("Cur_Month")
i = Sheet1.Range("Cur_Month")
let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source
If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE
Walking the tightrope between genius and eejit...
Try this.
i = [Cur_Month]
If posting code please use code tags, see here.
Hi,
Do you mean you have define a named range in one of your worksheets?
if yes, you will need to define a Range type variable in the VBA procedure and set it to the named range:
Thanks,Dim i as Range Set i=thisworkbook.worksheets("Sheet_Name").range("Named_Range")
Excelfandoo
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks