Hi, now i am trying to update the pivot table when the spreadsheet is being call.
I use the following method in the project explorer
Private Sub Worksheet_PivotTableUpdate(ByVal Target As PivotTable)
Worksheets("PivotTable").PivotTables(3).PivotCache.Refresh
End Sub
Worksheets("PivotTable") is my spreadsheet name
PivotTables(3) is the name of my pivot table
but i still hit a error
Run-time error '1004':
Unable to get the PivotTables property of the Worksheet Class
I have try :
changing Worksheets("PivotTable") to Worksheets(3)
changing the name of my pivot table
Any1 know why ? Thx in advance :wink:
[/img]
I use the following method in the project explorer
Private Sub Worksheet_PivotTableUpdate(ByVal Target As PivotTable)
Worksheets("PivotTable").PivotTables(3).PivotCache.Refresh
End Sub
Worksheets("PivotTable") is my spreadsheet name
PivotTables(3) is the name of my pivot table
but i still hit a error
Run-time error '1004':
Unable to get the PivotTables property of the Worksheet Class
I have try :
changing Worksheets("PivotTable") to Worksheets(3)
changing the name of my pivot table
Any1 know why ? Thx in advance :wink:
[/img]