Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Newsgroup Archive
Excel Newsgroups
Excel Programming
non-repeating Comboboxes values
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="noname, post: 6454054"] Yes, the other 3 should update their list items, but i am not sure if it would be right to clear their initial existing values on each combo change event. -------------------- 'i have written the code for only 2 comboboxes, but should be implemented in all 4 comboboxes change event. Private Sub ComboBox1_Change() With ComboBox2 Select Case ComboBox1.Value Case "Empathy" If ComboBox1.Value = ComboBox2.Value Or ComboBox1.Value = ComboBox3.Value Or ComboBox1.Value = ComboBox4.Value Then .Clear .AddItem "Persuasion" .AddItem "Impact" .AddItem "Communication" Case "Persuasion" .Clear .AddItem "Empathy" .AddItem "Impact" .AddItem "Communication" Case "Impact" .Clear .AddItem "Empathy" .AddItem "Persuasion" .AddItem "Communication" Case "Communication" .Clear .AddItem "Empathy" .AddItem "Persuasion" .AddItem "Impact" End Select End With With ComboBox3 Select Case ComboBox1.Value Case "Empathy" .Clear .AddItem "Persuasion" .AddItem "Impact" .AddItem "Communication" Case "Persuasion" .Clear .AddItem "Empathy" .AddItem "Impact" .AddItem "Communication" Case "Impact" .Clear .AddItem "Empathy" .AddItem "Persuasion" .AddItem "Communication" Case "Communication" .Clear .AddItem "Empathy" .AddItem "Persuasion" .AddItem "Impact" End Select End With With ComboBox4 Select Case ComboBox1.Value Case "Empathy" .Clear .AddItem "Persuasion" .AddItem "Impact" .AddItem "Communication" Case "Persuasion" .Clear .AddItem "Empathy" .AddItem "Impact" .AddItem "Communication" Case "Impact" .Clear .AddItem "Empathy" .AddItem "Persuasion" .AddItem "Communication" Case "Communication" .Clear .AddItem "Empathy" .AddItem "Persuasion" .AddItem "Impact" End Select End With End Sub Private Sub ComboBox2_Change() With ComboBox1 Select Case ComboBox2.Value Case "Empathy" .Clear .AddItem "Persuasion" .AddItem "Impact" .AddItem "Communication" Case "Persuasion" .Clear .AddItem "Empathy" .AddItem "Impact" .AddItem "Communication" Case "Impact" .Clear .AddItem "Empathy" .AddItem "Persuasion" .AddItem "Communication" Case "Communication" .Clear .AddItem "Empathy" .AddItem "Persuasion" .AddItem "Impact" End Select End With With ComboBox3 Select Case ComboBox2.Value Case "Empathy" .Clear .AddItem "Persuasion" .AddItem "Impact" .AddItem "Communication" Case "Persuasion" .Clear .AddItem "Empathy" .AddItem "Impact" .AddItem "Communication" Case "Impact" .Clear .AddItem "Empathy" .AddItem "Persuasion" .AddItem "Communication" Case "Communication" .Clear .AddItem "Empathy" .AddItem "Persuasion" .AddItem "Impact" End Select End With With ComboBox4 Select Case ComboBox2.Value Case "Empathy" .Clear .AddItem "Persuasion" .AddItem "Impact" .AddItem "Communication" Case "Persuasion" .Clear .AddItem "Empathy" .AddItem "Impact" .AddItem "Communication" Case "Impact" .Clear .AddItem "Empathy" .AddItem "Persuasion" .AddItem "Communication" Case "Communication" .Clear .AddItem "Empathy" .AddItem "Persuasion" .AddItem "Impact" End Select End With End Sub Private Sub UserForm_Initialize() Dim strEPIC() As String ReDim strEPIC(4) strEPIC(0) = "Empathy" strEPIC(1) = "Persuasion" strEPIC(2) = "Impact" strEPIC(3) = "Communication" For i = 0 To 3 Me.ComboBox1.AddItem strEPIC(i) Me.ComboBox2.AddItem strEPIC(i) Me.ComboBox3.AddItem strEPIC(i) Next i End Sub [/QUOTE]
Verification
Post reply
Forums
Archive
Newsgroup Archive
Excel Newsgroups
Excel Programming
non-repeating Comboboxes values
Top