Dear Experts
I found the following workbook function on the web and i dont know how to convert it into a macro. Being a new user of VBA i have tried and failed in last cpl of days
Option Explicit
Private Sub Worksheet_PivotTableUpdate(ByVal Target As PivotTable)
Dim ptTable As PivotTable, strField As String
strField = "FIELD 1"' I WOULD WANT TO RENAME THIS TO ROUTE instead of FIELD 1
On Error GoTo ExitPoint
Application.EnableEvents = False
For Each ptTable In ActiveSheet.PivotTables
If ptTable <> Target Then
ptTable.PageFields(strField).CurrentPage = Target.PageFields(strField).CurrentPage.Value
End If
Next ptTable
ExitPoint:
Application.EnableEvents = True
End Sub
Bookmarks