Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Run multiple excel files off of one macro.
I have about 5 excel files that I want to run one macro on all five. As soon
as I run the macro on one excel file, it won't work on the next. I have to close the macro, open it again, then run the macro on the excel spreadsheet, etc. Is there a way around this? |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Run multiple excel files off of one macro.
Sub WontWork
Workbooks.Open FileOne Call RunCode(FileOne) Workbooks. Close FileOne SaveChanges:=True Workbooks.Open FileTwo Call RunCode(FileTwo) Workbooks.Close FileTwo SaveChanges:=True 'more of the same End Sub Function RunCode (ByRef objWorkBk as Excel.Workbook) 'Code to do stuff to objWorkBk End Function "ahsya" wrote in message I have about 5 excel files that I want to run one macro on all five. As soon as I run the macro on one excel file, it won't work on the next. I have to close the macro, open it again, then run the macro on the excel spreadsheet, etc. Is there a way around this? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Import multiple text files (Macro) | Excel Discussion (Misc queries) | |||
how to copy multiple Excel files from Outlook into Excel??? | Excel Discussion (Misc queries) | |||
how do I join multiple excel files into 1 file? | Excel Discussion (Misc queries) | |||
Exporting from Excel to multiple XML files | Excel Discussion (Misc queries) | |||
Combine multiple Excel files into one master | Excel Discussion (Misc queries) |