Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / October 2007

Tip: Looking for answers? Try searching our database.

Processing data before auto-refresh

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Chris Youlden - 09 Oct 2007 22:15 GMT
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
Barb Reinhardt - 10 Oct 2007 18:48 GMT
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.

Signature

HTH,
Barb Reinhardt

> I have a Spreadsheet (Excel 2003) which successfully imports external
> data from an Access database when the file is first opened.
[quoted text clipped - 8 lines]
>
> Chris
Chris Youlden - 10 Oct 2007 23:04 GMT
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.

Signature

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.

"Chris Youlden" wrote:
> > I have a Spreadsheet (Excel 2003) which successfully imports external
> > data from an Access database when the file is first opened.
[quoted text clipped - 8 lines]
> >
> > Chris
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.