Hi!
I've got myself stuck, I have 20 Checkboxes and 20 ComboBoxes next to each other. In the ComboBoxes there're five different values to chose from, if one out of four of the five values in one ComboBox is choosen, I want the CheckBox next to it to be filled in. I don't want it to be checked as soon as one of the values is selected, just if one of four out of the five different values is set.
Do anybody have any idea of what kind of VBA-code I need to do this?
I was thinking that maby if the Value is serching for a specific term to be in the ComboBox that would triger the CheckBox, but no. But anyways this is my code as it stands, please take in perspective that this is the first time I use VBA and have looked everywhere online without any sucess.
Private Sub ComboBox1_Change()
If Sheet1.ComboBox1("ComboBox1").Value = "Name" Then
Range("Sheet1.CheckBox.1").Value = xlOn
Else
Range("Sheet1.CheckBox.1").Value = xlOff
End If
End Sub
PS! *Name* in this code is one of the values you can chose from in the ComboBox!
I've got myself stuck, I have 20 Checkboxes and 20 ComboBoxes next to each other. In the ComboBoxes there're five different values to chose from, if one out of four of the five values in one ComboBox is choosen, I want the CheckBox next to it to be filled in. I don't want it to be checked as soon as one of the values is selected, just if one of four out of the five different values is set.
Do anybody have any idea of what kind of VBA-code I need to do this?
I was thinking that maby if the Value is serching for a specific term to be in the ComboBox that would triger the CheckBox, but no. But anyways this is my code as it stands, please take in perspective that this is the first time I use VBA and have looked everywhere online without any sucess.
Private Sub ComboBox1_Change()
If Sheet1.ComboBox1("ComboBox1").Value = "Name" Then
Range("Sheet1.CheckBox.1").Value = xlOn
Else
Range("Sheet1.CheckBox.1").Value = xlOff
End If
End Sub
PS! *Name* in this code is one of the values you can chose from in the ComboBox!