Hello,
For a print form I'm trying to populate a Listbox with data filtered from a single sheet
I've managed to do so for a single column. All empty cells are ignored and only populated celss are used.
How can i use from the same rows the data in anothe column?
I would like the listbox in the most ideal situation populated from the last 15 results of column R and column T
The code so far I have is:
Dim i As Long, vArray() As Variant, ArrCount As Long
ArrCount = 0 'offset vanaf boven
ReDim vArray(ArrCount)
With Sheets("Gen1_Schema")
For i = 18 To .Range("R65536").End(xlUp).Row
If .Cells(i, 18) <> "" Then
ReDim Preserve vArray(ArrCount)
vArray(ArrCount) = .Cells(i, 18)
'vArray(ArrCount, 1) = .Cells(i, 18)
'vArray(ArrCount, 2) = .Cells(i, 20)
ArrCount = ArrCount + 1
End If
Next i
End With
Cat1_Rapportage.ListBox1.List = vArray
Me.ListBox1.Selected(Me.ListBox1.ListCount - 1) = True
Me.ListBox1.Selected(Me.ListBox1.ListCount - 1) = False
Bookmarks