Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Running macro on Open

I have a workbook in which 2 of the worksheets are filled with external data
from 2 separate text files. The workbook will be utilized daily and the text
files will also be updated daily. To keep the data current, I have the
refresh on the data as everytime the workbook is opened. I also have 3
macros that extract/analyze the data from the text files.

I had set the 3 macros to run on the open of the workbook, however they run
before the data is updated from the text files. Is there a way to refresh
the data first, then have th macros run?

Thanks for the help.
Ed
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Running macro on Open

Ed,

You can schedule those three macros to run after opening by using the Application.OnTime method in
the autoopen macro/ open event.

HTH,
Bernie
MS Excel MVP


"ETLahrs" wrote in message
...
I have a workbook in which 2 of the worksheets are filled with external data
from 2 separate text files. The workbook will be utilized daily and the text
files will also be updated daily. To keep the data current, I have the
refresh on the data as everytime the workbook is opened. I also have 3
macros that extract/analyze the data from the text files.

I had set the 3 macros to run on the open of the workbook, however they run
before the data is updated from the text files. Is there a way to refresh
the data first, then have th macros run?

Thanks for the help.
Ed



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Running macro on Open

Thanks. That will work. The only other idea I came up with was doing
Selection.QueryTable.Refresh BackgroundQuery:=False
before the macros.

Thanks Again.

"Bernie Deitrick" wrote:

Ed,

You can schedule those three macros to run after opening by using the Application.OnTime method in
the autoopen macro/ open event.

HTH,
Bernie
MS Excel MVP


"ETLahrs" wrote in message
...
I have a workbook in which 2 of the worksheets are filled with external data
from 2 separate text files. The workbook will be utilized daily and the text
files will also be updated daily. To keep the data current, I have the
refresh on the data as everytime the workbook is opened. I also have 3
macros that extract/analyze the data from the text files.

I had set the 3 macros to run on the open of the workbook, however they run
before the data is updated from the text files. Is there a way to refresh
the data first, then have th macros run?

Thanks for the help.
Ed




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Running macro on file open excelnerd Excel Discussion (Misc queries) 3 March 12th 08 10:51 PM
Automate Open an XLS without running macro matelot Excel Programming 2 August 2nd 07 06:52 AM
Running macro on open of workbook? Lime Excel Programming 5 June 14th 06 06:41 PM
macro not running on workbook open Nick Smith[_2_] Excel Programming 4 May 11th 06 10:24 AM
Auto Running a macro on open Jamie Excel Programming 2 May 24th 05 05:52 PM


All times are GMT +1. The time now is 07:19 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"