Why not just use the Run statement? It is so much simplier. Dim process_id, number Run "c:\\vbwork\\stats\\mybat.bat v1 v2 v3 b c", "c:\\vbwork\\stats", process_id If you need to calculate paremeters on the fly use ConcatEx to build the complete command line. The Run statement for the first parameter accepts the complete command line as you you would use it from the DOS prompt. : Hi all : I'd like to run a batch file passing parameters: Call( : "shell32.dll", "ShellExecuteA", "lSSlSll", : True, & : 0, "open", "mailing.bat", & : 0, "c:\vbwork\stats", myprog_name) : how can i use something like: mybat.bat & v1 & " " & v2 : & " " & v3 & " " & b & " : " & c : Second question: I'm on W2k and i always have a msg when lunching the shell32 : if any of u have used the shell command successfuly, i'll be happy to get : some help : Thx for your answers : yann
|