Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Clearing combo box in XL 1

Status
Not open for further replies.

groverno1

Technical User
Jul 31, 2003
3
US
I have combo boxes for employees to select the number of hours worked in a given day. My list is essentially, "[Blank], .5, 1.0, 1.5, 2.0, etc." I would like to code a command button to reset all the combo boxes to [Blank], the first line in my list. I tried recording a macro and selected the line, but apparently combo boxes are not subject to coding. Any thoughts?

Thanks.

Darren
dgilmore at thewrcgroup.com
 
In the click event for your command button you need the code

'clear combobox1
ComboBox1.Clear
'add blank item
ComboBox1.AddItem ""

hope this helps

Stephen
 
you'll need to following code in the click event for your command button

ComboBox1.Clear
ComboBox1.AddItem ""
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top