PERFORM ACTION ON HITTING ENTER

  • Thread starter Thread starter BigT
  • Start date Start date
B

BigT

Hi all. I have a spreadsheet with a database query, a pivot table
based on that query and a summary page summarizing that data. The
data is date driven. I'd like to automatically refresh the query and
pivot table when hitting "enter" after typing in a new date. anyway
to do this?
I'm 2003 right now and will be upgrading in a few months to 2010.
 
hi,

don't forget to adapt the sheets name and range name


Private Sub Worksheet_Change(ByVal Target As Range)
Set isect = Application.Intersect(Target, Range("summary"))
If Not isect Is Nothing Then
Sheets("PT").PivotTables(1).PivotCache.Refresh
Sheets("QT").QueryTables(1).Refresh BackgroundQuery:=True
End If
End Sub
 
Back
Top