MrExcel Publishing
Your One Stop for Excel Tips & Solutions

How do I execute a .bat file using Excel VBA?

Posted by Blazer Fool on October 04, 2001 10:42 AM

Anyone know how to execute a DOS .bat file from within Excel using VBA code?



Posted by Jerid on October 04, 2001 11:07 AM

Try Call Shell("Drive:\Path\BatchFileName.bat",vbNormalFocus)

You have a few options for how to display the Shell window, vbHide would be another one.