Hi
Seeking help to pass a variable in the below code.
Period = ActiveSheet.Range("A1")
' Range("A1") = Jan 2001
Working
WS.PivotTables(Pvt.Name).PivotFields("[Date].[Year].[Mth]") _
.VisibleItemsList = Array("[Date].[Year].[Mth].&[Jan 2021]")
Not Working
WS.PivotTables(Pvt.Name).PivotFields("[Date].[Year].[Mth]") _
.VisibleItemsList = Array("[Date].[Year].[Mth].&[Period]")
Thanks,
arv
Seeking help to pass a variable in the below code.
Period = ActiveSheet.Range("A1")
' Range("A1") = Jan 2001
Working
WS.PivotTables(Pvt.Name).PivotFields("[Date].[Year].[Mth]") _
.VisibleItemsList = Array("[Date].[Year].[Mth].&[Jan 2021]")
Not Working
WS.PivotTables(Pvt.Name).PivotFields("[Date].[Year].[Mth]") _
.VisibleItemsList = Array("[Date].[Year].[Mth].&[Period]")
Thanks,
arv