LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 852
Default Opening a list of Excel files and run a macro in each

Is there a generic code that will take a list of Excel files (workbooks) in column A, open each one, and run a macro that is in that file then close it.

I have code that opens a workbook and does some stuff then saves it but the name is hard coded in the open file code statement and it is a single workbook.

In my search I find little help and what I did find this is about all I understood of the code, which runs the sub named MyMacro for that workbook.

Run("MyMacro")

I assume the code would assign each file name to a variable and then that variable would be properly placed in the open file code and I would have to change MyMacro to the actual name of the sub I wanted to run.

Thanks.
Howard
 
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
Opening / Closing files using Excel Macro? Wes_A[_2_] Excel Programming 2 November 11th 09 03:26 AM
Excel files with list function not opening in Excel 2000 Kyleonthweb Excel Discussion (Misc queries) 3 April 29th 08 06:26 PM
macro for opening all excel files and copying contents roshinpp_77 Excel Programming 2 May 30th 06 01:18 PM
Error opening files from a list in a spreadsheet Anolan Excel Programming 2 November 28th 05 02:21 PM
Opening Files based on list Mike Etzkorn[_2_] Excel Programming 3 January 9th 04 03:41 AM


All times are GMT +1. The time now is 06:09 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"