PDA

View Full Version : Solved: update pivot table



CCkfm2000
02-20-2006, 10:26 AM
hi all..

i have a pivot table and i need it to update it when i go to the sheet.
i've come up with the following code see below.
but it only updates the table when i click on a cell.

Private Sub worksheet_selectionchange(ByVal target As Excel.Range)
ActiveSheet.PivotTables("PivotTable1").RefreshTable
End Sub


please help

thanks

JonPeltier
02-20-2006, 10:39 AM
Private Sub Worksheet_Activate()
ActiveSheet.PivotTables("PivotTable1").RefreshTable
End Sub

CCkfm2000
02-20-2006, 10:43 AM
thanks for the quick reply.

thats it

it works

thanks again