Combobox Query
This may help you get started. The code goes in the Userform module
Option Explicit
Private Sub c1_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean)
If c1 < "" Then
If c1 = c2.Value _
Or c1 = c3.Value _
Or c1 = c4.Value Then
MsgBox "That value is already used."
Else
MsgBox "Okay"
''Do something here - your code
End If
End If
End Sub
"Greg" wrote:
Hi all
I have 4 comboboxes on my userform and they are called c1 c2 c3 and c4 I
want to have excel check up to make sure the same value is not used twice.
I have tries this myself and have not suceeded because of when it is left
blank it activates the code i have written to warn of duplicates.
Can some one help me with this
Thanks
Greg
|