Solved

Clearing a combo box

Posted on 2002-04-19
4
1,457 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…

914 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

21 Experts available now in Live!

Get 1:1 Help Now