-
Hi,
I am using a combobox with the style set to 2.
What I would like to do is when the index changes from one value to another I would like to know so that I can display some other information on the form. I am not losing focus of the control, so that won't work.
Is there event that I can use to perform this check? I have tried a listbox but I like the drop down style better.
Thanks
-
How about something like this ? Store the initial value of the combo box and then check the value when the combo box is clicked.
Code:
Option Explicit
Dim lastCombo As String
Private Sub Combo1_Click()
If Combo1.Text <> lastCombo Then
MsgBox "Combo Value has Changed"
lastCombo = Combo1.Text
End If
End Sub
Private Sub Form_Load()
lastCombo = "One"
Combo1.AddItem "One"
Combo1.AddItem "Two"
Combo1.AddItem "Three"
Combo1.AddItem "Four"
Combo1.Text = "One"
End Sub
-