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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB Script to open excel workbooks sequentially

Status
Not open for further replies.

WSC4ME

Technical User
Jun 2, 2006
6
CA
Hello all,

I have five workbooks that I need open one after the other. They are all in one folder. They autorefresh external data upon opening, then a macro runs to push the data to another database, then they close. I need to write a script to open the first one, wait until it runs and closes, then open the second, do the same, third, etc, until they have all run. ANy help would be greatly appreciated!
 
why don't you just modify your macro in each to close the file, then open the next file? Then all you need to do is either launch the first file by name and let its macro run.

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top