+ Reply to Thread
Results 1 to 6 of 6

How to save user form checkbox values when opening and closing workbook

  1. #1
    Registered User
    Join Date
    12-17-2010
    Location
    New York, NY
    MS-Off Ver
    Excel 2007
    Posts
    6

    How to save user form checkbox values when opening and closing workbook

    Hope all is well. I've been searching the internet all morning and haven't been able to find the solution to this. I basically have a userform that contains a handful of checkboxes, problem is that when a user closes the workbook the userform resets and all the checkbox values disappear. How do I set this up so that when you save/close the file and reopen it all the values are retained?

    Thank you.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: How to save user form checkbox values when opening and closing workbook

    The values need to be stored in the workbook somewhere
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    12-17-2010
    Location
    New York, NY
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: How to save user form checkbox values when opening and closing workbook

    I guess my question is how do I go about doing that etc.

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: How to save user form checkbox values when opening and closing workbook

    A bit hard to say without the workbook. The easiest way would be to store them on a hidden sheet, then get the userform to get the values on initialising

  5. #5
    Forum Contributor
    Join Date
    08-21-2008
    Location
    Hamilton, New Zealand
    MS-Off Ver
    Office 2007
    Posts
    255

    Re: How to save user form checkbox values when opening and closing workbook

    The following example will store all checkbox values as names, then restore when form is re-intialised.

    Please Login or Register  to view this content.

  6. #6
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: How to save user form checkbox values when opening and closing workbook

    @wotadude,

    Nice method.
    I reduced it to:

    Please Login or Register  to view this content.



+ 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