Hello, each time when running the below code, I receive the error, "The item cannot be found in the OLAP Cube". Very confused and cannot figure out what to do Any help would be appreciated! I would like this code to filter the pivot field based on the value in M1.
Dim HC As String
Dim Sheet As Worksheet
Set Sheet = Worksheets("FS")
HC = Sheet.Range("M1").Value
Sheet.PivotTables("PivotTable1").PivotFields( _
"[FI].[Hold Co 4 ID].[Hold Co 4 ID]").VisibleItemsList = Array( _
HC)
Dim HC As String
Dim Sheet As Worksheet
Set Sheet = Worksheets("FS")
HC = Sheet.Range("M1").Value
Sheet.PivotTables("PivotTable1").PivotFields( _
"[FI].[Hold Co 4 ID].[Hold Co 4 ID]").VisibleItemsList = Array( _
HC)