PDA

View Full Version : Solved: Excel equivalent to MS Word's DOCVARIABLE?



Paul_Hossler
08-15-2009, 08:38 AM
Word VBA has the DOCVARIABLE that is persistent and stays with the document.

Does Excel have something similar, or can anyone suggest an alternative?

Right now I kludge settings in as a CustomProperty or a Name, either of which might be changed or deleted by the user.

Storing settings on a VeryHidden worksheet seems like a roundabout way, compared with the DOCVARIABLE concept.

Paul

Bob Phillips
08-15-2009, 08:53 AM
You can use a name and hide it



Dim nme As Name

Set nme = ActiveWorkbook.Names.Add(Name:="myVar", RefersTo:="Hidden Value")
nme.Visible = False


and then there is always the registry.

Paul_Hossler
08-15-2009, 09:09 AM
nme.Visible = False


didn't know about that

thanks #2

Paul