I have a userform with 2 Comboboxes (Combobox1 and Combobox2) as well as a "Save" and a "Cancel" Button. My goal is now, whenever I select one item of one combobox the other one should be "blocked" or disabled. So it can only save one item from one of these two comboboxes, when the save button is pressed.
This is how far I've come:
If ComboBox1.Text = "" Then Cancel = 1
MsgBox "Data couldn't be saved. Insert item."
ElseIf Combobox1.Value > 0 And Combobox2.Text = "" Then
If Combobox2.Text = "" Then Cancel = 1 MsgBox "Data couldn't be saved. Insert item."
ElseIf Combobox2.Value > 0 And Combobox1.Text = "" Then
If Combobox1.Value > 0 And Combobox2.Value > 0 Then Cancel = 1 MsgBox "Select only one item."
The issue now is, when I select one item for combobox1 and one for combobox2 it still saves it.
