View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Nick Hodge Nick Hodge is offline
external usenet poster
 
Posts: 1,173
Default Setting dropdown menu to default value

How about setting the value when you initialise it to one of the options.
The code below uses the userform_initialize event which adds 10 items
(testx) to the combobox and then shows the form with Test6 selected

Private Sub UserForm_Initialize()
Dim x As Integer
For x = 1 To 10
ComboBox1.AddItem ("Test" & x)
Next x
ComboBox1.Value = "Test6"
End Sub

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England

HIS
www.nickhodge.co.uk

wrote in message
oups.com...
I am using a series of dropdown menus in a userform.

Is there a way to set the value of a dropdown menu to a default.