+ Reply to Thread
Results 1 to 5 of 5

Clear all checkboxes

  1. #1
    Registered User
    Join Date
    09-26-2008
    Location
    North Myrtle Beach
    MS-Off Ver
    365 Business
    Posts
    82

    Clear all checkboxes

    Hi,

    I have a workbook with form checkboxes on about 3 of the worksheets. I have two issues I need help solving.

    1. For certain groups of checkboxes, If the "YES" checkbox is checked, I need the "No" to be cleared and vice versa.

    2. I need code that will automatically clear ALL the checkboxes in the workbook for when the user is ready to create a new file.

    I have searched several forums, and tried several different code options, but keep getting a run-time error saying "Unable to set the Value Property of the CheckBox Class"

    Been pulling my hair out for about an horu now so any help would be appreciated!

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Clear all checkboxes

    Hello bjohnsonac,

    This will clear all the Forms style check boxes on all the sheets.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    09-26-2008
    Location
    North Myrtle Beach
    MS-Off Ver
    365 Business
    Posts
    82

    Re: Clear all checkboxes

    That is the exact same code I have been using and I get the run-time error

    I am attaching a sample of the workbook here for reference if anyone can figure out my problem.

    Thanks again!
    Attached Files Attached Files

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Clear all checkboxes

    Hello bjohnsonac,

    Now that was a learning experience! It turns outs that grouped Forms Controls must first be selected before the control's value can be changed. The macro below works. It clears grouped Forms Check Boxes and Control ToolBox CheckBoxes. This has been added to the attached workbook.
    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    01-05-2009
    Location
    South Dakota, USA
    MS-Off Ver
    2003, and 2007
    Posts
    150

    Clear all checkboxes in active sheet

    posted in the wrong spot
    Last edited by 2funny4words; 03-02-2011 at 06:14 PM. Reason: miss post

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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