I'm getting an error that reads: Unable to set the visible property of the PivotItem class.
Can I use a variable to set the visible property? Maybe I'm just passing it in as the wrong type....
Here's the code:
Dim PivotWeek1 As String
PivotWeek1 = Sheets("Activity by Status").Range("C1").Value
With ActiveSheet.PivotTables("PivotTable4").PivotFields("Week")
.PivotItems(PivotWeek1).Visible = True
End With
Thanks!
Can I use a variable to set the visible property? Maybe I'm just passing it in as the wrong type....
Here's the code:
Dim PivotWeek1 As String
PivotWeek1 = Sheets("Activity by Status").Range("C1").Value
With ActiveSheet.PivotTables("PivotTable4").PivotFields("Week")
.PivotItems(PivotWeek1).Visible = True
End With
Thanks!