H
Herve cadieu
hi there
I need to used a returned variant from a function to fill a combobox
prior doing that I need to turn it in 9 columns
I have tried this code but it does not work who could help me ?
Dim DataIn As Variant
MBGetSampleDataVar DataIn
CbDataIn.ColumnCount = 9
Dim myarray
ReDim myarray(UBound(DataIn) \ 9 + 1, 9)
For i = LBound(DataIn) To UBound(DataIn)
a = IIf(i <= 9, i, i Mod 9)
n = i \ 9
myarray(n, a) = DataIn(i)
Next i
CbDataIn.Clear
CbDataIn.List() = myarray
CbDataIn.ListIndex = 1
I need to used a returned variant from a function to fill a combobox
prior doing that I need to turn it in 9 columns
I have tried this code but it does not work who could help me ?
Dim DataIn As Variant
MBGetSampleDataVar DataIn
CbDataIn.ColumnCount = 9
Dim myarray
ReDim myarray(UBound(DataIn) \ 9 + 1, 9)
For i = LBound(DataIn) To UBound(DataIn)
a = IIf(i <= 9, i, i Mod 9)
n = i \ 9
myarray(n, a) = DataIn(i)
Next i
CbDataIn.Clear
CbDataIn.List() = myarray
CbDataIn.ListIndex = 1