View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
L. Howard L. Howard is offline
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