Consulting

Results 1 to 3 of 3

Thread: Solved: Excel equivalent to MS Word's DOCVARIABLE?

  1. #1
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,728
    Location

    Solved: Excel equivalent to MS Word's DOCVARIABLE?

    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

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    You can use a name and hide it

    [vba]

    Dim nme As Name

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

    and then there is always the registry.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,728
    Location
    nme.Visible = False
    didn't know about that

    thanks #2

    Paul

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •