+ Reply to Thread
Results 1 to 5 of 5

Display checkboxes only when a certain condition is met

  1. #1
    Registered User
    Join Date
    11-17-2020
    Location
    UK
    MS-Off Ver
    2016
    Posts
    21

    Display checkboxes only when a certain condition is met

    Hello all! I hope to find you well.

    I've been looking for ways of displaying only certain checkboxes when a given condition is met, however, I haven't find anything.

    In my task, I have a Department Code (cell D9 of Sheet1) that can assume the value 130, 131, 132, 138, 182, 184 or 187.

    Then, from A37 to A40, I have 4 checkboxes (product offered).

    This excel will work like a simulator that everyone can use. And, for example, once a person writes 130 in D9, I would like her/him to see and be able to select only the checboxex a,c,d. Another example: when a person selects from the dropdown list "138", she/he should be only able to see and to select the checkboxes a,b. And so on (you can see the matching in sheet "Department and Products")

    Any ideas of how I should proceed?

    Thank you very much!
    Attached Files Attached Files
    Last edited by AliGW; 01-20-2022 at 10:32 AM.

  2. #2
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: Display checkboxes only when a certain condition is met

    Place this in the sheet1 code module

    Please Login or Register  to view this content.
    and this code in any module

    Please Login or Register  to view this content.
    Last edited by AliGW; 01-20-2022 at 10:35 AM.

  3. #3
    Registered User
    Join Date
    11-17-2020
    Location
    UK
    MS-Off Ver
    2016
    Posts
    21

    Re: Display checkboxes only when a certain condition is met

    Thank you very much maniacb
    And what if, instead of only hiding checkbox, hiding the whole row of the checkbox? Is it possible?
    Thank you!

  4. #4
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: Display checkboxes only when a certain condition is met

    Hiding the row won’t necessarily hide the checkbox, but we can hide both using the same logic

  5. #5
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: Display checkboxes only when a certain condition is met

    Here you go

    Please Login or Register  to view this content.
    and

    Please Login or Register  to view this content.
    Last edited by AliGW; 01-20-2022 at 10:37 AM.

+ 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. Replies: 19
    Last Post: 05-21-2019, 03:17 PM
  2. [SOLVED] VBA to add Checkboxes Based on Condition in Another Range
    By phelbin in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-30-2016, 04:10 PM
  3. Checkboxes If Else condition..
    By siobeh in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-24-2014, 05:11 PM
  4. Print Sheets based on checkboxes in UserForm, Checkboxes also control another macro
    By krackaberr in forum Excel Programming / VBA / Macros
    Replies: 34
    Last Post: 03-05-2013, 11:12 AM
  5. Display Combo Box if a condition is met.
    By JanRaven in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-24-2013, 11:26 PM
  6. Format Checkboxes and Option Boxes to display required data
    By BoopsForever in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-07-2009, 05:51 PM
  7. how do i create a macro to clear checkboxes and display a message.
    By Xavierskyrider in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-25-2005, 06:06 PM

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