Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 621
  • Last Modified:

VB 6.0 ComboBox onchange

Ola,

How do I know that the selectedIndex has changed from a VB 6.0 ComboBox, I am missing the needed events to do it.
Does someone know a workaround?

0
DaFou
Asked:
DaFou
  • 2
2 Solutions
 
KarcOriginCommented:
Private Sub Combo1_Click()
    Debug.Print "I have changed"
End Sub
0
 
TimCotteeCommented:
Hi DaFou,

Use the ComboBox_Click() event rather than the Change event. The Change event fires when you enter in the text-edit section of a combobox which is not defined as a fixed list. The click event fires when one of the items is selected either using the keyboard or mouse as appropriate.

Tim Cottee
Brainbench MVP for Visual Basic
http://www.brainbench.com
0
 
KarcOriginCommented:
Hi,

Addition to my comment even if you change the ListIndex of the combo box the Click event fires.

Eg:
Combo1.ListIndex = 2

Ya TimCottee that is what I have shown DaFou in my first comment. Anyways, I hope we are helping him.

Keep the good work going on. Cheers!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now