View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
jlclyde jlclyde is offline
external usenet poster
 
Posts: 410
Default Form Help - ComboBox - VBA

On Jan 13, 1:11*pm, "Jim Cone" wrote:
Private Sub UserForm_Initialize()
* Dim varList As Variant
* varList = Array("LDC", "DC", "DB", "LDDB", "XmasDB", "XmasLDDB", _
* * * * * * * * * * * * * * "XmasDC", "XmasLDC", "No Die", "Same Die As")
* CmbxFirst.List = varList
* CmbxSecond.List = varList
End Sub
--
Jim Cone
Portland, Oregon *USA

"jlclyde"

wrote in message
I have a form and when I initialize the form I need multiple combo
boxes to fill in with the same data. *Is there an easier way then
doing .additem for each one? *My code below.
Thanks Jay

Private Sub UserForm_Initialize()
With CmbxFirst 'this loads the combo
* * .AddItem "LDC"
* * .AddItem "DC"
* * .AddItem "DB"
* * .AddItem "LDDB"
* * .AddItem "XmasDB"
* * .AddItem "XmasLDDB"
* * .AddItem "XmasDC"
* * .AddItem "XmasLDC"
* * .AddItem "No Die"
* * .AddItem "Same Die As"
End With
With CmbxSecond 'this loads the combo
* * .AddItem "LDC"
* * .AddItem "DC"
* * .AddItem "DB"
* * .AddItem "LDDB"
* * .AddItem "XmasDB"
* * .AddItem "XmasLDDB"
* * .AddItem "XmasDC"
* * .AddItem "XmasLDC"
* * .AddItem "No Die"
* * .AddItem "Same Die As"
End With


Jim,