Getting “Invalid Procedure Call Argument” When i run call a Bat file from Subroutine
问题 Find the below code: Sub Button1_Click() argh = Shell("C:\Users\YYYY\Desktop\test1.bat", vbNormalNoFocus) End Sub When I run call a Bat file from Subroutine, I always get below error. Attached screen shot as well. "Run time Error" "Invalid Procedure call or argument" 回答1: We cannot run a .bat file from Excel macro , It will always ask for the Administrator permissions. Better Create a .vbs file and call the .bat file from .vbs file. .vbs file : Save the file as runbatch.vbs Set objShell =