{"id":12087,"date":"2011-11-15T17:48:19","date_gmt":"2011-11-15T17:48:19","guid":{"rendered":"http:\/\/www.learnexcelmacro.com\/?p=652"},"modified":"2011-11-15T17:48:19","modified_gmt":"2011-11-15T17:48:19","slug":"how-to-run-a-batch-file-by-excel-vba","status":"publish","type":"post","link":"https:\/\/vmlogger.com\/excel\/2011\/11\/how-to-run-a-batch-file-by-excel-vba\/","title":{"rendered":"How to run a .bat file (Batch File) by Excel Macro"},"content":{"rendered":"
By executing the below code, you can run any .bat file in Excel Macro. This is very important that you should keep your Excel Sheet from which you want to execute the Batch file in “C:\\” drive only.<\/strong><\/span> It can be inside any other sub-folder but in C drive Only.<\/p>\n By executing the below code, you can run any .bat file in Excel Macro. This is very important that you should keep your Excel Sheet from which you want to execute the Batch file in “C:\\” drive only. It can be inside any other sub-folder but in C drive Only. shell(“c:\\abc.bat”) ‘ OR shell(“CMD.EXE \/c […]<\/p>\n","protected":false},"author":45,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[1678],"tags":[],"class_list":["post-12087","post","type-post","status-publish","format-standard","hentry","category-interesting-vba-functions"],"yoast_head":"\nshell(\"c:\\abc.bat\")\n\n' OR\n\nshell(\"CMD.EXE \/c c:\\abc.bat\")<\/code><\/pre>\n<\/span>","protected":false},"excerpt":{"rendered":"