+ Reply to Thread
Results 1 to 4 of 4

Save Multiple Checkbox Values

  1. #1
    Registered User
    Join Date
    03-07-2017
    Location
    Texas
    MS-Off Ver
    Office 2016
    Posts
    39

    Save Multiple Checkbox Values

    Hello, everyone! I'm having some trouble (again) with my code. After closing the UserForm and reopening it, I'd like for it to show the checkboxes that were previously checked for the ActiveCell. Currently, it does return the value of the last checkbox, but not the rest. I was hoping you awesome folks could help. Thanks.

    Please Login or Register  to view this content.

  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

    Re: Save Multiple Checkbox Values

    Good morning cluelessdood

    Userforms won't "remember" data from previous sessions - you can set a default value through VBA for every time they're opened but that's about it.

    What you will need to do is set up a hidden sheet that will store the default values. When the userform is opened, these values are read from your hidden sheet and the userform is populated using these values.
    When the userform is closed, these values are saved back to your hidden sheet.
    These are then saved with the file for the next time the userform is opened.

    HTH

    DominicB

  3. #3
    Registered User
    Join Date
    03-07-2017
    Location
    Texas
    MS-Off Ver
    Office 2016
    Posts
    39

    Re: Save Multiple Checkbox Values

    Quote Originally Posted by dominicb View Post
    Good morning cluelessdood

    Userforms won't "remember" data from previous sessions - you can set a default value through VBA for every time they're opened but that's about it.

    What you will need to do is set up a hidden sheet that will store the default values. When the userform is opened, these values are read from your hidden sheet and the userform is populated using these values.
    When the userform is closed, these values are saved back to your hidden sheet.
    These are then saved with the file for the next time the userform is opened.

    HTH

    DominicB
    I made the hidden sheet, but I'm not really sure how to connect it...

  4. #4
    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

    Re: Save Multiple Checkbox Values

    Hi cluelessdood

    If your hidden sheet is called "Sheet1", in cell A1 type "FALSE" - you don't have to type in uppercase, the cell will recognise it as a Boolean value and do it for you.
    In your UserForm_Initialize module use a line like this for every checkbox :
    Please Login or Register  to view this content.
    To set the flags in this sheet on exit, just use this command in reverse, thus :
    Please Login or Register  to view this content.
    HTH

    DominicB

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Multiple Checkbox values to one cell
    By MSchaffer in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-10-2017, 02:20 PM
  2. [SOLVED] Userform: Have multiple checkbox values populate to one cell
    By ciresuark in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-22-2014, 12:44 PM
  3. creating checkbox with multiple values
    By mosslovell in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-05-2014, 11:29 AM
  4. [SOLVED] Sum Multiple Checkbox Values in Single Cell
    By janicesm in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-01-2014, 01:30 PM
  5. How to display values in multiple lines if multiple checkbox's are selected?
    By kjshep in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-10-2012, 10:10 AM
  6. How to save user form checkbox values when opening and closing workbook
    By skfinance in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-13-2011, 06:28 PM
  7. Modify Checkbox Value on Save As Box
    By bhastings in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-25-2010, 08:55 AM

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