Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Autoexec - How do you do it? 3

Status
Not open for further replies.

MarksSparks

Technical User
Mar 14, 2003
8
US
I have an Excel workbook that I has a series of macros that inports information from .txt files on a server. I wish to schedule the update for first thing in the morning so that whne the folks come in all the information has been refreshed. I have done this in Access with the autoexec macro but I have not been able to figure out a similar routine in Excel. Can anybody tell me how to automatically trigger a macro on opening an Excel workbook.

Many Thanks

Mark.
 
Use a macro called Auto_open() which runs when the file is opened (bizarely enough)

regards
Steve

 
Since version 97 excel has ThisWorbook object, with its code module, representing the workbook. Workbook_Open() sub placed in this module is automatically executed when you open a workbook.

If you get data from text file using Data>External data option (from excel menu) you can set the property of imported range to automatically refresh data while opening workbook (and, also, at selected frequency) without any macro.

combo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top