Link to home
Start Free TrialLog in
Avatar of Sandra Smith
Sandra SmithFlag for United States of America

asked on

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

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.
Avatar of zorvek (Kevin Jones)
zorvek (Kevin Jones)
Flag of United States of America image

You need to add "" as a possible value in the value list. Then you can set the box to an empty string.

Kevin
cboName.Text=""
Avatar of Sandra Smith

ASKER

It is an item, but it simply won't reset.
Then use the Clear method:

ComboBox1.Clear

Kevin
ASKER CERTIFIED SOLUTION
Avatar of zorvek (Kevin Jones)
zorvek (Kevin Jones)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
That did it, thank you.