Set a default value to Drop Down Box

P

peekbo

Is it possible to set a 'default' value to a drop down box, so that n
matter what value was selected when it was saved, when the workboo
opens it changes to the default value?

I have a written a macro to do this for all the input cells that ar
not drop downs, but cannot figure out a way to change values in dro
down forms.

Thanks
Bria
 
D

Dave Peterson

What's the default value? The first on the list?

If yes:

Option Explicit
Sub auto_open()

Dim wks As Worksheet
Dim myDD As DropDown

For Each wks In ThisWorkbook.Worksheets
For Each myDD In wks.DropDowns
myDD.ListIndex = 1
Next myDD
Next wks

End Sub

You wrote dropdown--You used the dropdown from the Forms toolbar???
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top