View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default Automatic update

Select the sheet tab which you want to work with. Right click the sheet tab
and click on 'View Code'. This will launch VBE. Paste the below code to the
right blank portion. Get back to to workbook and try out.

Check out the date cell in the below code it is B8
Check out the name of the table "PivotTable1" and adjust to suit

Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Not Application.Intersect(Target, Range("B8")) Is Nothing Then
ActiveSheet.PivotTables("PivotTable1").PivotCache. Refresh
Application.EnableEvents = True
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"Jakob" wrote:

Hello

I want to update a pivot table when a cell is changed.

Sub Oppdater()
' Oppdate Makro
' Oppdate pivot
'
Private Sub date_Change()
' Oppdate if change

Range("B8").Select
ActiveSheet.PivotTables("Pivottabell1").PivotCache .Refresh
End Sub


--


Jakob
http://www.pointshop.no/austgulen