Private Sub Worksheet_Activate()
Sheets("sheetname").PivotTables("PivotTablename").RefreshTable
End Sub
Dear sir
I have used this vba code On a worksheet to auto refresh the pivot table on another sheet . It was working
But I have 2 more worksheets in my inventory , i am unable to do the same again for the respective worksheet and their pivot tables.
I tried to copy the same code to the respective worksheet with changing names of the sheet and table but excel shows compatibility error and not working .
Am using excel 2007 .
Kindly help me in this regard
Thank you
Sheets("sheetname").PivotTables("PivotTablename").RefreshTable
End Sub
Dear sir
I have used this vba code On a worksheet to auto refresh the pivot table on another sheet . It was working
But I have 2 more worksheets in my inventory , i am unable to do the same again for the respective worksheet and their pivot tables.
I tried to copy the same code to the respective worksheet with changing names of the sheet and table but excel shows compatibility error and not working .
Am using excel 2007 .
Kindly help me in this regard
Thank you