Hi all,
This should be a nice easy one for you gurus, as long as I can hopefully explain what I'm after.....
I have a Userform with 2 x checkboxes on the left and 2 x comboboxes on the right. By default, the checkboxes are unticked and the comboboxes have "Not Applicable" written in them.
Now, I want the user to tick the box if it is applicable, then choose the combobox value which will update the cell accordingly. Unfortunately, once you have ticked the checkbox, it displays "Not Applicable" but won't update the cell if I make a different choice in the combobox.
Unticking, then re-ticking the box updates the value in the cell, but I can't expect the user to know this.
In other words, how can I get the combobox to update the cell whenever a different choice is made? (dynamic choice, per se?)
Here is my very basic code:
Private Sub UserForm_Initialize()
ComboBox1.List = Array("Eastbound", "Westbound", "Both")
ComboBox2.List = Array("Eastbound", "Westbound", "Both")
End Sub
Private Sub CheckBox1_Click()
If CheckBox1.Value = True Then Range("C17").Value = ComboBox1
If CheckBox1.Value = False Then Range("C17").Value = "Not Applicable"
End Sub
Private Sub CheckBox2_Click()
If CheckBox2.Value = True Then Range("C18").Value = ComboBox2
If CheckBox2.Value = False Then Range("C18").Value = "Not Applicable"
End Sub
Please be gentle, I'm very new to this!
Thanks.
Bookmarks