F
feriba
Hi everyone!
After searching the newsgroup, I am still not sure if I can run a local
macro over hundreads of other Excel files. Here are more infos:
I need to code a vbscript that will open an Excel file containing
data(from our sql server) and execute a macro on that Excel file. The
macro is in a local Excel file. Once the macro is done, I need to save
the new Excel file under the same name. I can't really add the macro on
each data files... we have far too many.
Here is what a got so far...
Set xlApp = CreateObject("excel.application")
xlApp.Visible = True
xlApp.Workbooks.Open ("c:\Book1.xls")
xlApp.run "C:\AddressMacro.xls!ModifyPostalCode"
xlApp.Workbooks.save("c:\Book1.xls")
Now I am pretty sure the Macro won't run on Book1xls... How do I
associate it?
Please help!
After searching the newsgroup, I am still not sure if I can run a local
macro over hundreads of other Excel files. Here are more infos:
I need to code a vbscript that will open an Excel file containing
data(from our sql server) and execute a macro on that Excel file. The
macro is in a local Excel file. Once the macro is done, I need to save
the new Excel file under the same name. I can't really add the macro on
each data files... we have far too many.
Here is what a got so far...
Set xlApp = CreateObject("excel.application")
xlApp.Visible = True
xlApp.Workbooks.Open ("c:\Book1.xls")
xlApp.run "C:\AddressMacro.xls!ModifyPostalCode"
xlApp.Workbooks.save("c:\Book1.xls")
Now I am pretty sure the Macro won't run on Book1xls... How do I
associate it?
Please help!