Massimo Scola
asked on
Excel Multicolumn Listboxes. How to manually add additional data before data is inserted
I populate a multicolumn listbox with data from an array.
However, I would like to add one or two additional values manually before the array is populated that will appear at the top.
This is how I populate the listbox
I understand that .addItem has an optional parameter that would allow me to specify the index but it looks like this only works in single column listboxes - not in multi like mine.
I would like to add a value 0 and/or 1
Any ideas how to solve this?
Thanks
However, I would like to add one or two additional values manually before the array is populated that will appear at the top.
This is how I populate the listbox
With Me.lstContracts
.ColumnCount = 4
.ColumnWidths = "40,150;100,100"
If arrContracts(x, colRecyclingContractCustomerID) = CustomerID Then
.AddItem
.List(.ListCount - 1, 0) = arrContracts(x, 1)
.List(.ListCount - 1, 1) = arrContracts(x, colRecyclingContractSubscriptionName)
.List(.ListCount - 1, 2) = arrContracts(x, colRecyclingContractFirstPickup)
.List(.ListCount - 1, 3) = arrContracts(x, colRecyclingContractLastPickup)
End If
End With
Next x
I understand that .addItem has an optional parameter that would allow me to specify the index but it looks like this only works in single column listboxes - not in multi like mine.
I would like to add a value 0 and/or 1
Any ideas how to solve this?
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER