Processing data before auto-refresh

  • Thread starter Thread starter Chris Youlden
  • Start date Start date
C

Chris Youlden

I have a Spreadsheet (Excel 2003) which successfully imports external
data from an Access database when the file is first opened.

However macros seem to work before the new data is displayed even when
using 'after_refresh' and obviously this is a problem, as the
requirement is to process the refreshed data.

Can anyone advise how one gets around this?

Many thanks


Chris
 
I presume that there is a Workbook_Open macro that runs. If so, you may
want to add

Application.ScreenUpdating = False at the beginning and
Application.ScreenUpdating = True at the end.
 
Hi Barb

Thanks for your suggestion. However, that does not solve the problem. I
had assumed that when a workbook is opened with the Data Query Property
set to 'Refresh data on File Open', the refresh would happen before
macros run. This appears not to be the case.

Essentially what I need is to open a workbook which immediately imports
data from an Access db, and following this a macro runs which processes
that data. I have even tried putting a delay in the code but the
refresh simply waits for that :-(

I appreciate your help.


--
Chris


Barb said:
I presume that there is a Workbook_Open macro that runs. If so, you may
want to add

Application.ScreenUpdating = False at the beginning and
Application.ScreenUpdating = True at the end.

 
Back
Top