Enable Combo Box from Check Box - In EXCEL

NJUser

New Member
Joined
Jun 24, 2009
Messages
11
Hello all:
I'm trying to enable a Combo box, if a check box is selected (is TRUE). I saw a message on how to accomplish this in Access, but I'm struggling with Excel. Any assistance would be appreciated.

THANKS MUCH!!!
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
I'm sorry....I misrepresented what I needed to do. I need to make the ComboBox visible if Check box is selected (is True). If the check box is not selected (is False), then I don't want to show the Combo Box.

I tried this code for the Check Box, but think I'm missing some more code. (forgive me, I'm a newbie to code).
If CheckBox5.Value = False Then
ComboxBox3.Visible = False
End If
 
Upvote 0
This worked for me...

Code:
Private Sub UserForm_Initialize()
    ComboBox3.Visible = False
End Sub

Private Sub CheckBox5_Click()
    ComboBox3.Visible = CheckBox5.Value
End Sub
 
Upvote 0
One last question....promise. So the combo box that now appears/disappears has a selection of yes or no. If yes is selected, I want combobox 4 to display, if yes is not selected, I don't want ComboBox 4 to show up.

THANKS TREMENDOUSLY for all your help AlphaFrog!!! :)
 
Upvote 0
CheckBox5 toggles ComboBox3 visible\hidden
ComboBox3 is the Yes\No combobox and toggles ComboBox4 visible\hidden

Code:
Private Sub UserForm_Initialize()

    With ComboBox3
        .Visible = False
        .AddItem "Yes"
        .AddItem "No"
    End With
    
    ComboBox4.Visible = False
    
End Sub

Private Sub CheckBox5_Click()
    ComboBox3.Visible = CheckBox5.Value
End Sub

Private Sub ComboBox3_Change()
    If ComboBox3.Value = "Yes" Then
        ComboBox4.Visible = True
    ElseIf ComboBox3.Value = "No" Then
        ComboBox4.Visible = False
    End If
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,729
Members
452,939
Latest member
WCrawford

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top