PDA

Click to See Complete Forum and Search --> : ComboBox Array


[nordis]
Jan 17th, 2005, 04:08 AM
Hi All
I've been trying to populate a combobox with an array of all the month of the year, but with no luck.
There is probably a simpel task if you know how :)
I'm doing this in Excel 97 and I would like to use VBA rather than a cell range.
All help are appreciated
Thanks

Comintern
Jan 18th, 2005, 12:20 PM
Try this, where ComboBox1 is your control:

For iCount = 1 To 12
ComboBox1.AddItem (Format$(DateAdd("m", iCount, 0), "mmmm"))
Next iCount

[nordis]
Jan 24th, 2005, 12:09 PM
Thanks Comintern
I'll try that