Run Excel Macro from VBS or BAT file

Ulisses_Carso

New Member
Joined
Sep 4, 2020
Messages
39
Office Version
  1. 365
Platform
  1. Windows
Hi everyone, I have this macro that I need to run every day, I always have to open Excel App to open Personal.xslb with all my Macros and then run the macro I need.

Is there a way to use bat or vbs to create an executable for this macro? I'm not familiar with VBS or Batch files to do this.
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Excel was not designed to be made into an executable.

You can use the Windows Scheduler program (built-in to Windows) to run a workbook that contains only the macro you wish to activate.
The macro would be run when the workbook opens : Sub Workbook_Open()
 
Upvote 0

Forum statistics

Threads
1,214,911
Messages
6,122,198
Members
449,072
Latest member
DW Draft

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