MyArray (ComboBox.ListCount-1) possible?
"How do I set the total number of elements of an array to match
the total number of items in a ComboBox
Give this a try (where I assumed the ComboBox was named ComboBox1)...
Dim X As Long
Dim MyArray() As String
ReDim MyArray(0 To ComboBox1.ListCount - 1)
For X = 0 To ComboBox1.ListCount - 1
MyArray(X) = ComboBox1.List(X)
Next
Rick
|