Automatic Refresh Question

  • Thread starter Thread starter smonczka
  • Start date Start date
S

smonczka

I have a pivot table that pulls from an outside data source, when you
open up the file it always asks you if you want to "ENABLE AUTOMATIC
REFRESH". Is there any way to code this so it will automatically
refresh without asking the user? Maybe by setting up an on open macro
that would select the option to refresh for the user.

Thanks,
Steve
 
Sub Workbooks_Open
Application.DisplayAlerts = False
ActiveSheet.PivotTables("YourPivotTableName").PivotCache.Refresh
Application.DisplayAlerts = True
End Sub

Or, change ActiveSheet to Sheets("YourPivotTableSheet")

Regards,

Alan
 
Suppressing the notification for this sheet would work best...

Thanks to you both for your help. This was exactly what I needed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top