So I have a String array declared as this:
Dim astrSomethingList() As String: astrSomethingList = _
Array("01", "02", "03", "04", "05", "06", "07", "08", "20")
And then I try to assign this array to a ComboBox I have in a form, like this:
With m_form
...
.cboQuerySomething.List = astrSomethingList
...
End With
But when I try to compile and run it, it gives me the error The argument is not optional and refers to the .List = part of the code.
I have tried using
Set .cboQuerySomething.List = astrSomethingList
instead, but it does not work either.
What am I missing?
astrSomethingList = Array(...). You also should consult the documentation forListand/or stackoverflow.com/a/24889461/11683, having established that you are indeed using VB6/A and not VB.NET.