View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Robin Hammond[_2_] Robin Hammond[_2_] is offline
external usenet poster
 
Posts: 575
Default default drop box to a value?

Juan,

set the listindex property, or less reliably, set the value property of the
combobox. e.g. if the combo is on a form:

Private Sub UserForm_Initialize()
Dim lCount As Long
With ComboBox1
For lCount = 0 To 99
.AddItem lCount
Next lCount
.ListIndex = 0
'or not as reliable
'.Value = 99
End With
End Sub

Robin Hammond
www.enhanceddatasystems.com

"juan" wrote in message
...
Hello,
I have a drop down box. Can I default it to a value? I
have a macro and I have added a drop box, but would like
it to default to a value. Right now, it leaves it blank.

Please advise any feedback.

Thanks,

Juan