You can save a workbook with the macros that you want to run and set up the macros to start running when the workbook is open using the Open event.
In dos, you should be able to launch the workbook by using the excel.exe command followed by the path and workbook name in quotes. So if you are in the directory that excel.exe is in and you want to open excel and launch the workbook "test.xls" on your c: drive root directory, use the command:
excel.exe "c:\test.xls"
Your workbook will open and the macros should start running.
HTH
Thanks Dan, I may not have clearly stated what I would like to do. I have an application that generates csv files for several accounts. The format for each account/csv file varies. I have macros already set up in Excel for each account(the macro contains the account#,filename and path) that I manually run from within excel for each account that has a csv file in the current billing cycle. The macros imports the csv file, formats it correctly then saves it as and excel file. What I would like to do is create a .cmd file something like the following:
c:\office\excel.exe a123 (a123 being the macro to run, it would import the csv file named a123.csv, format it and save it with .xls ext then close excel)
c:\office\excel.exe b456 (b456 being the macro to run, it would import the csv file named b456.csv format it, save it with .xls ext then close excel)
The .cmd file would automate the whole process...
Hope this helps and hope there is a solution.
After giving your suggestion more thought I believe I have it figured out..I need to create a separate workbook for each account using the Auto_Open in the macros and assign it to the workbook for that account...Currently, I have all the different macros in one workbook. This is the problem. Thanks for pointing me in the right direction. Ed