I have a ListBox where are some columns names, and I'd like to build a matrix with only the selected columns in it. Is there a simple way to do that?
I'm actually trying with :
Dim Matrix_a() As Variant
J = 0
For i = 0 To ListBox1.ListCount - 1
If ListBox1.Selected(i) Then
J = J + 1
Matrix_a.Columns(J) = Price.Columns(i)
End If
Next i
where "Price" is a previously defined range. this doesn't work because of an "incorrect qualificator", but I don't see how to bypass that (my VBA level being quite low).
Am I missing something?