I have a regular combo box that I’ve populated with fixed values from a collection object. One of the values is “OTHER”. I needed to test the value of the ComboBox for OTHER and them make visible another text field on the same form. I’m using the LostFocus event to do this test, which works great if they tab out of the field (Validate didn’t fire for all conditions I needed). So I also wanted to handle the condition where the user uses the mouse to select OTHER. I used the click event of the ComboBox to test this action, but whenever you type anything in, the click event fires. I thought it only was supposed to fire when using the mouse. So how do I handle surpressing or passing over the code in the click event unless the user, well, clicks on a value?
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
Click event firing and shouldn’t be (VB6)
Home » Forums » AskWoody support » Productivity software by function » Visual Basic for Applications » Click event firing and shouldn’t be (VB6)
- This topic has 10 replies, 4 voices, and was last updated 20 years, 9 months ago.
AuthorTopicWSMike Shea
AskWoody LoungerAugust 16, 2004 at 9:49 pm #408707Viewing 3 reply threadsAuthorReplies-
WSjscher2000
AskWoody Lounger -
WSjscher2000
AskWoody Lounger -
WScharlotte
AskWoody Lounger -
WSMike Shea
AskWoody Lounger -
WSMarkD
AskWoody LoungerAugust 19, 2004 at 12:30 am #866377FWIW, according to an “official” source (MSDN):
This event “occurs when the user presses and then releases a mouse button over an object. It can also occur when the value of a control is changed.” And: “Selects an item in a ComboBox or ListBox control, either by pressing the arrow keys or by clicking the mouse button.” Not much else specific to combobox control. According to unofficial (but reliable?) source (Visual Basic Controls In A Nutshell (O’Reilly Press)), the ComboBox Click event takes place any time the user scrolls thru the list and selects items, “whether by mouse, keyboard, or code.” Also, changing the ListIndex property in code will fire the Click event. The Change event indicates that the text in text portion of combobox has changed (simple and drop-down style comboboxes). The Scroll event is fired whenever list is scrolled, whether by mouse or keyboard. In any event it appears the Click event is not limited to mouse input when triggered.
You will probably have to experiment to find the right sequence of events to accomplish task.
HTH
-
WSMike Shea
AskWoody Lounger -
WSMike Shea
AskWoody Lounger
-
-
WSMarkD
AskWoody LoungerAugust 19, 2004 at 12:30 am #866378FWIW, according to an “official” source (MSDN):
This event “occurs when the user presses and then releases a mouse button over an object. It can also occur when the value of a control is changed.” And: “Selects an item in a ComboBox or ListBox control, either by pressing the arrow keys or by clicking the mouse button.” Not much else specific to combobox control. According to unofficial (but reliable?) source (Visual Basic Controls In A Nutshell (O’Reilly Press)), the ComboBox Click event takes place any time the user scrolls thru the list and selects items, “whether by mouse, keyboard, or code.” Also, changing the ListIndex property in code will fire the Click event. The Change event indicates that the text in text portion of combobox has changed (simple and drop-down style comboboxes). The Scroll event is fired whenever list is scrolled, whether by mouse or keyboard. In any event it appears the Click event is not limited to mouse input when triggered.
You will probably have to experiment to find the right sequence of events to accomplish task.
HTH
-
-
WSMike Shea
AskWoody Lounger
-
-
WScharlotte
AskWoody Lounger
Viewing 3 reply threads -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Cox Communications and Charter Communications to merge
by
not so anon
2 hours, 29 minutes ago -
Help with WD usb driver on Windows 11
by
Tex265
1 hour, 37 minutes ago -
hibernate activation
by
e_belmont
5 hours, 22 minutes ago -
Red Hat Enterprise Linux 10 with AI assistant
by
Alex5723
9 hours, 10 minutes ago -
Windows 11 Insider Preview build 26200.5603 released to DEV
by
joep517
12 hours, 15 minutes ago -
Windows 11 Insider Preview build 26120.4151 (24H2) released to BETA
by
joep517
12 hours, 16 minutes ago -
Fixing Windows 24H2 failed KB5058411 install
by
Alex5723
15 hours, 26 minutes ago -
Out of band for Windows 10
by
Susan Bradley
16 hours, 59 minutes ago -
Giving UniGetUi a test run.
by
RetiredGeek
23 hours, 57 minutes ago -
Windows 11 Insider Preview Build 26100.4188 (24H2) released to Release Preview
by
joep517
1 day, 7 hours ago -
Microsoft is now putting quantum encryption in Windows builds
by
Alex5723
1 day, 5 hours ago -
Auto Time Zone Adjustment
by
wadeer
1 day, 12 hours ago -
To download Win 11 Pro 23H2 ISO.
by
Eddieloh
1 day, 9 hours ago -
Manage your browsing experience with Edge
by
Mary Branscombe
14 hours, 18 minutes ago -
Fewer vulnerabilities, larger updates
by
Susan Bradley
2 hours, 44 minutes ago -
Hobbies — There’s free software for that!
by
Deanna McElveen
9 hours, 8 minutes ago -
Apps included with macOS
by
Will Fastie
7 hours ago -
Xfinity home internet
by
MrJimPhelps
3 hours, 47 minutes ago -
Convert PowerPoint presentation to Impress
by
RetiredGeek
1 day, 5 hours ago -
Debian 12.11 released
by
Alex5723
2 days, 9 hours ago -
Microsoft: Troubleshoot problems updating Windows
by
Alex5723
2 days, 12 hours ago -
Woman Files for Divorce After ChatGPT “Reads” Husband’s Coffee Cup
by
Alex5723
1 day, 16 hours ago -
Moving fwd, Win 11 Pro,, which is best? Lenovo refurb
by
Deo
1 hour, 40 minutes ago -
DBOS Advanced Network Analysis
by
Kathy Stevens
3 days, 5 hours ago -
Microsoft Edge Launching Automatically?
by
healeyinpa
2 days, 20 hours ago -
Google Chrome to block admin-level browser launches for better security
by
Alex5723
17 hours, 55 minutes ago -
iPhone SE2 Stolen Device Protection
by
Rick Corbett
3 days ago -
Some advice for managing my wireless internet gateway
by
LHiggins
2 days, 8 hours ago -
NO POWER IN KEYBOARD OR MOUSE
by
HE48AEEXX77WEN4Edbtm
1 day, 10 hours ago -
A CVE-MITRE-CISA-CNA Extravaganza
by
Nibbled To Death By Ducks
3 days, 17 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.