Solved

Clearing a combo box

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying 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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

688 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