0

Can I run a macro in a batch script?

like SET HOME_PATH=%loaction% vba %macro%

Is it possible to call a macro in batch script?

Community
  • 1
  • 1
user2582367
  • 43
  • 1
  • 2
  • 8
  • Provide an example of a macro you would like to call. What language is it written in? How do you run it currently? – Dwayne Towell Oct 18 '13 at 06:34
  • Batch script after performing its function gives output in excel sheets and Macro called 'FileOper.xlsm' need to perform excel operation like vlookup in batch script generated excel sheets. Currently macro is in seperate path which will take excel as an input from the hard coded path. I just want to include the macro inside batch script. – user2582367 Oct 18 '13 at 07:35
  • Related question: [How to launch an Excel macro from command line](http://stackoverflow.com/questions/10881951/how-to-launch-an-excel-macro-from-command-line-without-worksheet-open-event) – Dwayne Towell Oct 19 '13 at 00:29

1 Answers1

0

You can open an excel file from a batch script and run a macro whenever the excel file is opened, but whatever you are trying to do will probably be done better if it is not done with a macro

neelsg
  • 4,802
  • 5
  • 34
  • 58