Reference A Named Formula in VB

  • Thread starter Thread starter Paul Corrado
  • Start date Start date
P

Paul Corrado

Trying to include a reference the a Named Formula in my program.

The Named Formula is constant integer that changes over time so I do not
wish to hard code that value.

I tried

xyzvalue = Range("namedformula")

and that doesn't work. (Probably because the named formula isn't a range.)

Any help would be appreciated.

TIA

PC
 
xyzValue = Evaluate(thisworkbook.Names("NameFormla").RefersTo)

using evaluate gets rid of the equal sign.
 
Fantastic!

Thank you very much Tom.

PC

Tom Ogilvy said:
xyzValue = Evaluate(thisworkbook.Names("NameFormla").RefersTo)

using evaluate gets rid of the equal sign.
 

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

Back
Top