Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2011-03-16
6
Medium Priority
?
353 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
[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
  • 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
Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

 
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 2000 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

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

When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
Ever visit a website where you spotted a really cool looking Font, yet couldn't figure out which font family it belonged to, or how to get a copy of it for your own use? This article explains the process of doing exactly that, as well as showing how…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

715 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