English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

2007-06-22 16:17:32 · 4 answers · asked by Anonymous in Computers & Internet Programming & Design

I'm using it as a drop-down box.

2007-06-22 16:24:23 · update #1

Non-editable drop-down list I mean.

2007-06-22 16:25:32 · update #2

Private Sub form_load()
Combo1.AddItem "hi"
Combo1.AddItem "hi2"
Combo1.AddItem "hi3"
End Sub
Sub Combo1_Change()
Call MsgBox("changed")
End Sub

I want a command to fire once someone changes the selection in the drop-down list.

the Combo1_Click() sub doesn't fire when I change the selection I don't understant why.

2007-06-23 04:19:13 · update #3

4 answers

In Visual Basic 6.0, the Change event of the ComboBox control is raised when the text of the control is modified. The Change event is not raised when an item is selected from the list portion of the control. Programmatically changing the text of an item in the list does not raise the Change event.

The work around is to use the click() event with specifying if else condition.

Hope this helps.

2007-06-25 10:12:41 · answer #1 · answered by Vic 3 · 0 0

You will have to be much more specific,

If your form has an object named Combo1 the Change() event will fire after you change the value of the combo box.

What it will or will not do depends on the code you have written. If the code is not working then you will have to show the sub routine here in total and give some idea of what you expect to happen after you change the value in the combo box.

2007-06-23 02:27:49 · answer #2 · answered by Grateful 2 · 0 0

If you want to be notified when the user makes a selection from the combo (as seems a reasonable thing to do) use combo1_Click()

That'll do ya

2007-06-23 01:52:57 · answer #3 · answered by miket 4 · 0 1

It works when you enter something into the combo.
Try and see

2007-06-22 23:22:40 · answer #4 · answered by cmr 3 · 0 1

fedest.com, questions and answers