|
-
Apr 6th, 2005, 07:12 AM
#1
Thread Starter
New Member
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
-
Apr 12th, 2005, 01:48 AM
#2
Addicted Member
Re: Using Array with ComboBox
try this:
Sub Test()
Dim DaMonths as Variant
DaMonths = Array ("jan","feb","mar")
ComboBox1.List DaMonths
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|