Hi, I have the following code, that results in the above error when it hits the highlighted line:
For Each WS In ActiveWorkbook.Worksheets
WS.Select
If ActiveSheet.Name Like "Pivot*" And ActiveSheet.Name <> "Pivot Current month" Then
With ActiveSheet.PivotTables("PivotTable1").PivotFields("Period")
.PivotItems("Flash").Position = .PivotItems.Count
End With
End If
Next WS
Can anyone please advise me as to what is going wrong here.
For Each WS In ActiveWorkbook.Worksheets
WS.Select
If ActiveSheet.Name Like "Pivot*" And ActiveSheet.Name <> "Pivot Current month" Then
With ActiveSheet.PivotTables("PivotTable1").PivotFields("Period")
.PivotItems("Flash").Position = .PivotItems.Count
End With
End If
Next WS
Can anyone please advise me as to what is going wrong here.