Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all
I have a userform with 8 combobox's and I have them all linked to the same row sources. How can I stop the user from selecting a same value as another combobox in this group Thanks in advance |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Couldn't you use the click event to test it?
Private Sub ComboBox1_Change() CheckValue ComboBox1 End Sub Private Sub ComboBox2_Change() CheckValue ComboBox2 End Sub Sub CheckValue(Combo As MSForms.ComboBox) Dim oCtl As Control For Each oCtl In Me.Controls If TypeName(oCtl) = "ComboBox" Then If oCtl.Name < Combo.Name Then If oCtl.ListIndex < -1 Then If Combo.Value = oCtl.Value Then MsgBox "Duplicate" oCtl.ListIndex = -1 End If End If End If End If Next oCtl End Sub -- HTH RP (remove nothere from the email address if mailing direct) "browie" wrote in message ... Hi all I have a userform with 8 combobox's and I have them all linked to the same row sources. How can I stop the user from selecting a same value as another combobox in this group Thanks in advance |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Do not allow duplicates | Excel Discussion (Misc queries) | |||
Condensing a list with duplicates to a list with non-duplicates | Excel Worksheet Functions | |||
Duplicates in excel that aren't 100% DUPLICATES ... | Excel Discussion (Misc queries) | |||
Duplicates? | Excel Discussion (Misc queries) | |||
Duplicates Value | Excel Programming |