G
Guest
I am trying to run a .bat file from a macro. The shell command works okay most of the time - but I cannot seem to make it work if there is a space in the path. (So, running C:\Apps\BFIle.bat works, but not C:\My Apps\BFile.bat)
As the .bat file I want to run will change, I want to enter the path in a cell, and then run the macro with a button. This means simply enteing the path in double quotation marks in the Shell command will not work.
BFile = Range("A2").Value
i = Shell (BFile, 1)
Any ideas?
As the .bat file I want to run will change, I want to enter the path in a cell, and then run the macro with a button. This means simply enteing the path in double quotation marks in the Shell command will not work.
BFile = Range("A2").Value
i = Shell (BFile, 1)
Any ideas?