Hi,
I’ve got the following macro that isn’t quite working. I didn’t want to have to actually name every single worksheet that had the word “budget” in the worksheet name, so I used the If, Then statement. The error I keep getting is that there is no “For” to go with the “Next”. Any help would be awesome.
Thanks!
Lana
Sub testpt()
For Each Worksheet In Worksheets
If Worksheet.Name = “*Budget” Then
ActiveSheet.PivotTables(“PivotTable5”).PivotFields(“Period”). _
CurrentPage = Sheet6.Range(“AK8”).Value
Else: Range(“A1”).Select
Next Worksheet
End Sub