Solved

Set combo to "" after user update in Excel form with VBA

Posted on 2011-03-16
6
343 Views
Last Modified: 2012-05-11
I have a form whereby theuser updates underlying data.  It can be an update to existing data or the user can close the account.  What I would like (and can't seem to get done), is when the user closeds an account, the data is removed from the underlyiing worksheet and the form empties.  However, the "group" combo box still reflect the group the user selected.  How can I simply set this to an empty text string?  I don't want the drop-down items to disappear, I just want a blank control.  I tried setting it to "", but that did not work.
0
Comment
Question by:ssmith94015
  • 3
  • 2
6 Comments
 
LVL 81

Expert Comment

by:zorvek (Kevin Jones)
ID: 35150801
You need to add "" as a possible value in the value list. Then you can set the box to an empty string.

Kevin
0
 
LVL 33

Expert Comment

by:jppinto
ID: 35150807
cboName.Text=""
0
 

Author Comment

by:ssmith94015
ID: 35150811
It is an item, but it simply won't reset.
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 81

Expert Comment

by:zorvek (Kevin Jones)
ID: 35150831
Then use the Clear method:

ComboBox1.Clear

Kevin
0
 
LVL 81

Accepted Solution

by:
zorvek (Kevin Jones) earned 500 total points
ID: 35150902
Another technique:

ComboBox1.ListIndex = -1

This maintains the list while clearing the entry field.

Kevin
0
 

Author Closing Comment

by:ssmith94015
ID: 35150957
That did it, thank you.
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Lync meeting or Lync conferencing is what many organizations would like to deploy to allow them save money. But companies are now giving up for various reasons, one of which is that they cannot join external meetings (non-federated company meetings)…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

747 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

11 Experts available now in Live!

Get 1:1 Help Now