Thread: Named Constant
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Shatin[_2_] Shatin[_2_] is offline
external usenet poster
 
Posts: 56
Default Named Constant

Wow, that's quick and exactly what I want!

Many thanks indeed, Ron!

"Ron Coderre" wrote in message
...
Try this:

To get the value:
Names("Status").RefersTo

To set the value:
Names("Status").RefersTo = "OFF"

Does that help?
Post back if you have more questions.
--------------------------

Regards,

Ron
Microsoft MVP (Excel)
(XL2003, Win XP)

"Shatin" wrote in message
...
Hi All,

If I have a named constant in a certain worksheet called "Status" whose
inital value is "On". What's the vba code for:

- finding out what the value of this named constant is?
- changing the value to "Off" if the value is "On"?

TIA