permanently storing values
Amazing chart utilities from Jon Peltier
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 2 of 2

Thread: permanently storing values

  1. #1
    New Member
    Join Date
    Mar 2002
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    Hi,

    I want to permanently store a value that can be referenced next time the sheet is opened, but I'd prefer not to use the sheets to store the value as these can then be edited by the user.

    What I want to do is store the value as a permanent constant.

    Something similar to the word VBA stuff:
    activedocument.Variables.Add "sample", 19

    Any ideas anyone,

    Any help much appreciated.

    Cheers,

    epymsam

  2. #2
    MrExcel MVP Jay Petrulis's Avatar
    Join Date
    Mar 2002
    Location
    Chicago, IL USA
    Posts
    2,040
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    Hi,

    Insert>Name>Define

    Name your variable and assign it the value you want.

    This isn't foolproof, but should be OK.

    You also may want to assign a constant in a VBA module and password protect the VBA so the variable can't be changed. I don't know off hand what would happen if someone tries to reassign the value of the variable by naming it, for instance.

    HTH,
    Jay

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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

 

 
DMCA.com