|
-
Dec 4th, 2000, 11:29 AM
#1
Thread Starter
Fanatic Member
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
-
Dec 4th, 2000, 11:38 AM
#2
Fanatic Member
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
-
Dec 4th, 2000, 12:38 PM
#3
Thread Starter
Fanatic Member
duh,
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|