View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
dutty dutty is offline
external usenet poster
 
Posts: 7
Default Timing of automatic query refresh and macro pivot table refresh

I have a user form set to load and show upon file open that has two fields
for user parameter entry--Customer, and Start Date. Button macro pastes this
information into cells in Sheet 1 and Sheet 2, which contain queries to an
external database. Queries are set to automatically refresh when the cells
change. Sheet 3 contains 2 pivot tables, which after the pasting from the
user form is done, are coded to refresh (then user form hides). The problem
is, the pivot tables refresh before the queries refresh, because the user has
to select the "Enable Automatic Refresh" button after the user form hides.

Can I use VB code to enable the automatic refresh when the sheet opens, and
then time the refresh of the pivot tables to follow the queries' refresh?