Solved

Clearing a combo box

Posted on 2002-04-19
4
1,454 Views
Last Modified: 2012-08-13
I want to reset the selected item in a combo box. I am letting the user select an item then this item is written to a DB and the combo reset. I am using VB6 and the style of the combo is 2 - drop down list

Thanks

merlin007
0
Comment
Question by:merlin007
  • 2
4 Comments
 
LVL 43

Expert Comment

by:TimCottee
ID: 6953949
Use

Combo1.RemoveItem Combo1.ListIndex

0
 
LVL 2

Accepted Solution

by:
UncleMatt earned 50 total points
ID: 6953950
try cbowhatever.listindex = -1

Matt.
0
 

Author Comment

by:merlin007
ID: 6953998
Thanks Uncle Matt
TimCoffee - the RemoveItem take the selection from the list completely. I probably did not explain the question properly, Thanks

Regards

Merlin007
0
 
LVL 43

Expert Comment

by:TimCottee
ID: 6954028
You probably did merlin, I just misinterpreted it. Anyway you got a good answer from UncleMatt.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Share codes 68 115
Vb.net 2008 2 51
VBA error replacing data 6 35
I need help formating a date variable in my VB.Net application 2 35
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

746 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now