Clearing Dropdowns In A Worksheet

  • Thread starter Thread starter Aechelon
  • Start date Start date
A

Aechelon

Hello, what i'm trying to do is this. I have some dropdown boxes from
the forms toolbar, not the control toolbar, in my sheet. I have these
boxes pulling from another sheet that i set up as a database. By using
the index command, i am able to pull various information from the
database sheet depending on the subject selected in the dropdown box.
What I want to do is set up a command button that will reset all the
dropdown boxes back to empty when pressed. I have searched for days
and can not figure this out. Please help!
 
Okay, i *FINALLY* got it to work. This is what i did:


Sub Button23_Click()

Dim db As ControlFormat

Set db = ActiveSheet.Shapes("Drop Down 9").ControlFormat

db.ListIndex = 0

End Sub

If there's a better way, i'm always ready to learn. Thanks.
 
Sub Button23_Click()
Dim drpdwn as DropDown
for each drpdwn in Activesheet.Dropdowns
drpdwn.Listindex = 0
Next
End Sub

for a single dropdown.

Sub Button23_Click()
Activesheet.DropDowns("Drop Down 9").ListIndex = 0
End Sub
 
Back
Top