+ Reply to Thread
Results 1 to 10 of 10

To hide the checkboxes based on a selection in the dropdown menu

  1. #1
    Registered User
    Join Date
    03-27-2014
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2007
    Posts
    10

    To hide the checkboxes based on a selection in the dropdown menu

    Hi,

    I am trying to hide the checkboxes based on a dropdown selection. I have attached a worksheet as an example.
    I do not want the checkboxes to appear when the sheet is initially launched. Once we make a selection in the drop down (Either one device, two device, three device, Device in production) only then the checkboxes should appear and once we reset the dropdown back to " Select PS Engagement" the check boxes should disappear.
    i.e. when the dropdown value is between (one device, two device, three device, device in production) the checkboxes should appear and should be unchecked so that i am able to check them.
    but when the value is : "Select PS Engagement" the checkboxes should disappear/hide.

    Thanks
    Attached Files Attached Files

  2. #2
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: To hide the checkboxes based on a selection in the dropdown menu

    Hi Simrat Kaur

    Place this Code in ThisWorkbook Code Module
    Please Login or Register  to view this content.
    Place this Code in Sheet1 Code Module
    Please Login or Register  to view this content.
    Attached Files Attached Files
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  3. #3
    Registered User
    Join Date
    03-27-2014
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: To hide the checkboxes based on a selection in the dropdown menu

    Hi Jaslake,

    Thanks so much for the code. It is perfect. But I am trying to achieve one more thing. I want the checkboxes to get unchecked automatically once we change the selection in the dropdown. Else everything is perfect. Thanks again

  4. #4
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: To hide the checkboxes based on a selection in the dropdown menu

    Hi Simrat Kaur

    If I understand, replace the Code with this
    Please Login or Register  to view this content.
    And this
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    03-27-2014
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: To hide the checkboxes based on a selection in the dropdown menu

    Thanks so much Jaslake . this is more than perfect.

  6. #6
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: To hide the checkboxes based on a selection in the dropdown menu

    Hi Simrat Kaur

    You're welcome...glad I could help.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

    If this resolves your issue please mark your Thread as SOLVED.

    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:
    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

  7. #7
    Registered User
    Join Date
    03-27-2014
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: To hide the checkboxes based on a selection in the dropdown menu

    Hi Jaslake,

    I have discovered something here. When I save the sheet after making my selection (i.e. selecting the required checkboxes) but when I open it again the checkboxes that I selected are not there. I want the checkboxes to hide only when the selection in Dropdown is "Select PS Engagement" but when it is among the other option sin the dropdown i want the checkboxes to stay when I try to reopen the saved worksheet.

    Thanks

  8. #8
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: To hide the checkboxes based on a selection in the dropdown menu

    Hi Simrat Kaur

    If I understand, replace the Workbook.Open Code with this
    Please Login or Register  to view this content.
    If you want the Check Boxes CLEARED when you open the file remove the Comment Marker from this Line
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    03-27-2014
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: To hide the checkboxes based on a selection in the dropdown menu

    Thanks. You are the best

  10. #10
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: To hide the checkboxes based on a selection in the dropdown menu

    You're welcome...glad I could help. Thanks for the Rep.

+ 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. Change button function based on dropdown menu selection?
    By FancyB in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-10-2014, 04:39 PM
  2. Replies: 1
    Last Post: 03-27-2013, 07:04 AM
  3. Replies: 5
    Last Post: 09-30-2012, 10:43 AM
  4. Sum data based on selection on dropdown menu
    By brama80 in forum Excel General
    Replies: 4
    Last Post: 05-02-2012, 08:01 AM
  5. Hide Rows based on dropdown selection...
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-27-2008, 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