View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Marcos[_2_] Marcos[_2_] is offline
external usenet poster
 
Posts: 6
Default send parameters to a batch file with the shell command

Ardus
Thanks, it did work for me as well...
My real problem was calling a macro in the directory C:\Documents and
Settings\Marcos\Desktop\temp.
For the email i wrote c:\temp to simplify, but and as I tried with
c:\temp it did work as you said.

This helped me workout the solution. I was running
mycmd= "C:\Documents and Settings\Marcos\Desktop\temp\x.bat 2006"
RetVal = Shell(mycmd, 1)
it seems a double quetes were needed for the path above.
Adding:
mycmd= chr$(34)+"C:\Documents and
Settings\Marcos\Desktop\temp\x.bat"+chr$(34)+" 2006"
did the trick.
thanks for the help,
Marcos