I have a fixed command which i need to pass to command prompt using VBA and then the command should run. e.g. "perl a.pl c:\temp"
following is the command i am trying to use but it just opens command prompt and doesn't run the command.
Call Shell("cmd.exe -s:" & "perl a.pl c:\temp", vbNormalFocus)
Please check.
The S parameter does not do anything on its own.
Try something like this instead
You may not even need to add "cmd.exe" to this command unless you want a command window to open up when this is run. Shell should execute the command on its own.
-Edit-
To wait for the command to finish you will have to do something like @Nate Hekman shows in his answer here