Hello,

I want to edit the 20140331 to reference a specific cell but I'm not sure how to write it out to make it work.

This is the simple code I have:

Sub Test()


Dim YYYYMMDD As Long
YYYYMMDD = Worksheets("sheet1").Range("FDM_Date").Value

    ActiveSheet.PivotTables("PivotTable1").PivotFields("[Time].[Time].[Year]").VisibleItemsList = Array("")
    ActiveSheet.PivotTables("PivotTable1").PivotFields("[Time].[Time].[Qtr]").VisibleItemsList = Array("")
    ActiveSheet.PivotTables("PivotTable1").PivotFields("[Time].[Time].[Month]").VisibleItemsList = Array("")
    ActiveSheet.PivotTables("PivotTable1").PivotFields("[Time].[Time].[Date]").VisibleItemsList = Array("[Time].[Time].[Date].&[20140331]")



End Sub
Note: I do not need for it to be refreshed when that cell changes. I will add on to this code once I get this to work that will include refreshing. I just need to know how to basically put the "YYYYMMDD" into where 20140331 is to make it work.

Thanks!!