Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

VB 6.0 ComboBox onchange

Posted on 2004-09-09
3
610 Views
Last Modified: 2013-12-25
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
Comment
Question by:DaFou
  • 2
3 Comments
 
LVL 5

Assisted Solution

by:KarcOrigin
KarcOrigin earned 200 total points
ID: 12016487
Private Sub Combo1_Click()
    Debug.Print "I have changed"
End Sub
0
 
LVL 43

Accepted Solution

by:
TimCottee earned 300 total points
ID: 12016507
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
 
LVL 5

Expert Comment

by:KarcOrigin
ID: 12016552
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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question