+ Reply to Thread
Results 1 to 3 of 3

Change and Save Default Userform Properties

  1. #1
    Registered User
    Join Date
    03-07-2006
    Posts
    34

    Change and Save Default Userform Properties

    I have a userform that has several values that can be changed by the user. What I would like to do is have the default properties save once the form is exited. (with a save and close button)

    Currently, each time I change the values and close the form, the default values are displayed when opening the form next time. (as I would expect!)

    I'd like to change those default values and properties, and I would have thought it would be straight forward. I CAN do it by linking it to reference cell on a worksheet, but that's not what I am looking for.

    I want to initialize a variable when the form loads, based on the current values of certain objects, and don't want the variable tied to a cell value. But I don't want the user to have to change them each time the form is loaded.

    I hope I have explained this well enough!

    Thanks in advance.

  2. #2
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile

    Good evening kevindmorgan

    A userform cannot save data, only retrieve data from a worksheet (which doesn't necessarily have to be visible), or use it to enter data - which must then be saved to a worksheet if it is to appear non-volatile, ie., still be there the next time the worksheet is opened or the next time the userform is reshown after unloading.

    The only other option available to you is to save the setting to the users registry, which is the ideal solution if the userform is holding a users preferences for a workbook. VBA makes it relatively easy to write to and read from certain areas within the registry (for more info see the help files on the commands GetSetting and SaveSetting).

    HTH

    DominicB
    Please familiarise yourself with the rules before posting. You can find them here.

  3. #3
    Registered User
    Join Date
    03-07-2006
    Posts
    34
    DominicB

    Thanks for the reply! The Save/Get Settings is exactly what I needed!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1