Solved

VB 6.0 ComboBox onchange

Posted on 2004-09-09
3
614 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
[X]
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
  • 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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Suggested Solutions

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

751 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