Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
I have a drop down box with the first cell in the list I left blank. I woulod
like to set up a button that would reset the drop down button to a blank. What would the code be. Thank You -- Gary Baker |
#2
![]() |
|||
|
|||
![]()
It would depend on what you used to create that dropdown--and where you'd place
that code would depend on the type of button you used. If you used Data|validation, then... worksheets("sheet1").range("a1").clearcontents or worksheets("sheet1").range("a1").value = "" If you used a dropdown from the Forms toolbar, then... Worksheets("sheet1").DropDowns("drop down 1").Value = 0 or Worksheets("sheet1").DropDowns("drop down 1").ListIndex = 0 If you used a combobox from the control toolbox toolbar, then... Worksheets("sheet1").ComboBox1.Value = "" or Worksheets("sheet1").ComboBox1.ListIndex = -1 GWB Direct wrote: I have a drop down box with the first cell in the list I left blank. I woulod like to set up a button that would reset the drop down button to a blank. What would the code be. Thank You -- Gary Baker -- Dave Peterson |
#3
![]() |
|||
|
|||
![]()
Thanks Dave. As always you have been a big help. I used the forms toobar to
create the button and the combo drop down box. I'll try to use your code. -- Gary Baker "Dave Peterson" wrote: It would depend on what you used to create that dropdown--and where you'd place that code would depend on the type of button you used. If you used Data|validation, then... worksheets("sheet1").range("a1").clearcontents or worksheets("sheet1").range("a1").value = "" If you used a dropdown from the Forms toolbar, then... Worksheets("sheet1").DropDowns("drop down 1").Value = 0 or Worksheets("sheet1").DropDowns("drop down 1").ListIndex = 0 If you used a combobox from the control toolbox toolbar, then... Worksheets("sheet1").ComboBox1.Value = "" or Worksheets("sheet1").ComboBox1.ListIndex = -1 GWB Direct wrote: I have a drop down box with the first cell in the list I left blank. I woulod like to set up a button that would reset the drop down button to a blank. What would the code be. Thank You -- Gary Baker -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
can you make a drop down list in a drop down list? | Excel Discussion (Misc queries) | |||
formulas for drop down menus | Excel Discussion (Misc queries) | |||
How do I set up a drop down menu within a drop down menu? | Excel Discussion (Misc queries) | |||
automatic color change in cells using a drop down list | Excel Worksheet Functions | |||
Filling drop down box | Excel Discussion (Misc queries) |