Using Array with ComboBox
hi everyone,
im trying to wite a program that fills both Combo Boxes and List boxes using data from an exsiting array. So basically the array content goes into the Combo Boxes and List boxes.
this is how im currently doing it but i need to use an array instead that holds all the months in a year:
With ComboBox1
.AddItem "January"
.AddItem "February"
.AddItem "March"
.AddItem "April"
.AddItem "May"
.AddItem "June"
.AddItem "July"
.AddItem "August"
.AddItem "September"
.AddItem "October"
.AddItem "November"
.AddItem "December"
End With
similar for ListBox
Can anyone help?
thanks
Re: Using Array with ComboBox
try this:
Sub Test()
Dim DaMonths as Variant
DaMonths = Array ("jan","feb","mar")
ComboBox1.List DaMonths
End Sub