+ Reply to Thread
Results 1 to 6 of 6

Grey our a checkbox (not on a user form)

  1. #1
    Forum Contributor
    Join Date
    11-17-2004
    MS-Off Ver
    Office 2016
    Posts
    527

    Grey our a checkbox (not on a user form)

    I have 2 checkboxes on a worksheet. The second one has no purpose unless the first one is checked. I would like for the second checkbox to be greyed out until I click on the first one. Is this possible on a worksheet (I don't use a user form)

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Grey our a checkbox (not on a user form)

    Here is how to do it with ActiveX checkboxes. Needs VBA. (I don't know how to do this with Forms checkboxes but that would also need VBA.)

    Edit: If you have them both checked, then uncheck the first one, I also uncheck the second one.
    Attached Files Attached Files
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Contributor
    Join Date
    11-17-2004
    MS-Off Ver
    Office 2016
    Posts
    527

    Re: Grey our a checkbox (not on a user form)

    Thank you...This worked as advertised however I have some Mac users of my worksheet so I've been forced to use Forms Control checkboxes.

    I was able to come up with the following code for these Form Control checkboxes:

    Please Login or Register  to view this content.
    It required setting some similar code on the ThisWorkbook object in the Sub Workbook_Open() section to ensure that that behavior was in place before the checkbox was clicked on the first time.

  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: Grey our a checkbox (not on a user form)

    Hello JimDandy,

    The Forms Check Box controls don't have a greyed state when disabled. Instead, you could make the control visible or invisible. Copy the code below into a new VBA Module and then assign the macro to "Check Box 1". Be sure to change the names to match those on the worksheet.

    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!)

  5. #5
    Forum Contributor
    Join Date
    11-17-2004
    MS-Off Ver
    Office 2016
    Posts
    527

    Re: Grey our a checkbox (not on a user form)

    This was extremely helpful, it was just what I needed...Thank you

  6. #6
    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: Grey our a checkbox (not on a user form)

    Hello JimDandy,

    You're welcome.

+ 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. Populate checkbox values in user form to cell
    By pavu in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-22-2012, 08:26 AM
  2. Lock and Grey Out Options on a User Form
    By laffers in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 04-07-2011, 08:31 PM
  3. Code for simple checkbox on user form.
    By proepert in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-21-2010, 10:05 PM
  4. text box input and checkbox on user form
    By raw in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-05-2007, 05:27 PM
  5. [SOLVED] Checking the status of a checkbox in a user form
    By Peter Rooney in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 11-01-2005, 04:09 PM

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