Getting the entry of a Named Range

B

Brad E.

I have a Named Range called VERSION, in which I update every time I make a
new version of the workbook. In my macro, I want to grab this value.

ThisWorkbook.Names("VERSION").Value returns "=UPDATES!$D$16".

How should I change that line to return the value which is Cell D16 on my
UPDATES tab?
 
M

Mike H

Brad,

To get the value use

MyVar = ThisWorkbook.Names("Version").RefersToRange
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.
 
B

Brad E.

Thanks, Roger. I like this better than the "RefersToRange" method. Evaluate
makes sense to me. Brad
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top