Good afternoon,
Is there a way to use two cell references (A1 From Date & A2 To Date) to update a filter in a pivot table without actually showing the filter itself?
I have used the following code to align a name of the person who loads the file so they can only see their data, but I am insure how I would get the
"ActiveSheet.PivotTables("AgentManager").PivotFields("Call Date")" to look between the first date ("A1") and the final date ("A2"), is this something that can be done.
thanks in advance
Gavin
Is there a way to use two cell references (A1 From Date & A2 To Date) to update a filter in a pivot table without actually showing the filter itself?
I have used the following code to align a name of the person who loads the file so they can only see their data, but I am insure how I would get the
"ActiveSheet.PivotTables("AgentManager").PivotFields("Call Date")" to look between the first date ("A1") and the final date ("A2"), is this something that can be done.
Code:
Sub AgentManagerAlign()
Dim pvFld As PivotField
Dim strFilter As String
Set pvFld = ActiveSheet.PivotTables("AgentManager").PivotFields("Team Manager")
strFilter = ActiveWorkbook.Sheets("LiveStaffLoader").Range("B5").Value
pvFld.CurrentPage = strFilter
End Sub
thanks in advance
Gavin