Afternoon folks,
I'm hoping somebody out there can help me with the following...
I have a multi page UserForm that each contain a ListBox that is used to display info from separate Pivot Tables. Each ListBox is populated with the following code:
This all works great and the ListBox on each UserForm page displays the correct information.
I'm now needing a means to apply a use selected filter to the displayed data within the ListBox. I only need apply the filter to the PivotField "Account", an as hoping that this could be accomplished using a ComboBox on the same page.
if any of you esteemed gents would be able to point me in the direction of a means to achieving this goal, I'd be incredibly obliged!
I'm hoping somebody out there can help me with the following...
I have a multi page UserForm that each contain a ListBox that is used to display info from separate Pivot Tables. Each ListBox is populated with the following code:
Code:
Private Sub UserForm_Initialize()
Dim pvtTable As PivotTable
Dim vData As Variant
Set pvtTable = Worksheets("SHEET NAME HERE").PivotTables(1)
With pvtTable.TableRange1
'--read data into array
vData = .Offset(1).Resize(.Rows.count + pvtTable.ColumnGrand - 1)
End With
With Me.ListBox1
.ColumnCount = UBound(vData, 2)
'--transfer array values into listbox
.List = vData
End With
End Sub
This all works great and the ListBox on each UserForm page displays the correct information.
I'm now needing a means to apply a use selected filter to the displayed data within the ListBox. I only need apply the filter to the PivotField "Account", an as hoping that this could be accomplished using a ComboBox on the same page.
if any of you esteemed gents would be able to point me in the direction of a means to achieving this goal, I'd be incredibly obliged!
Last edited: