DOS BATCH program to open workbook, run macros

dwr0211

New Member
Joined
Aug 8, 2011
Messages
1
I need a DOS .bat program to open a work book and then I need to run two separate macros.
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
How about making a .bat program to just open the workbook
and letting the workbook run the two separate macros by using ThisWorkbook_Open() event.

If you have done enough research for your problem, you shouldn't have problem with opening a file.

anyways as for the workbook_Open event, you could also search up.

Calling subs/macros is shown in this code
Code:
Call Macro1 'Macro1 is the name of the macro.
 
Upvote 0
I couldn't fins the Excel equivelents in a quick search but in Lorus you would create a file called auto123 with a "\0" macro that opens the workbook you want, then have another "\0" macro in that file. HTH
 
Upvote 0

Forum statistics

Threads
1,224,524
Messages
6,179,308
Members
452,904
Latest member
CodeMasterX

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top