View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Roger Govier Roger Govier is offline
external usenet poster
 
Posts: 2,886
Default Executing a bat file from Excel

Hi

Shell("cmd.exe /c test.bat")

worked fine for me and ran test.bat in C:\Windows\System32
Give the full path of where your file is located
Ensure you have Exit as the last line of your bat file to return back to
Excel

--
Regards

Roger Govier


"Mr BT" wrote in message
news:kcNUh.83463$aG1.33381@pd7urf3no...
I would like to use a customized menu with a macro that will execute a
batch file.
I have read over http://www.mvps.org/dmcritchie/excel/shell.htm but I
don't believe this is what I need.

Thank you.

MrBT