Hello
I use theses codes
and
but doesn't work for me
my goal if I select items from two comboboxes should clear textboxes . if I select another item from combobox1 and the combobox2 is already selected item (not empty) then should clear all of textboxes ,if I select another item from combobox2 and the combobox1 is already selected item (not empty) then should clear all of textboxes .
any better way to do that
thanks in advance.
I use theses codes
VBA Code:
Private Sub UserForm_Initialize()
If ComboBox1.Value = and <> "" ComboBox2.Value <> "" Then
TextBox1.Value = ""
TextBox2.Value = ""
TextBox3.Value = ""
end if
End Sub
and
VBA Code:
Private Sub ComboBox1_Change()
If ComboBox1.Value <> "" And ComboBox2.Value <> "" Then
TextBox1.Value = ""
TextBox2.Value = ""
TextBox3.Value = ""
End If
End Sub
VBA Code:
Private Sub ComboBox2_Change()
If ComboBox2.Value <> "" And ComboBox1.Value <> "" Then
TextBox1.Value = ""
TextBox2.Value = ""
TextBox3.Value = ""
End If
End Sub
my goal if I select items from two comboboxes should clear textboxes . if I select another item from combobox1 and the combobox2 is already selected item (not empty) then should clear all of textboxes ,if I select another item from combobox2 and the combobox1 is already selected item (not empty) then should clear all of textboxes .
any better way to do that
thanks in advance.