I am trying to use the Windows API CreateProcess() to start a program within a VBA application.
I have hit problems. Now going back to basics and trying to launch program, with parameters, from the VBA shell function.
The appication starts sucessfully without the parameters ie
Retval = Shell("C:\Program Files\FastCut\FastCut",6)
Retval = Shell("C:\Program Files\FastCut\FastCut 12345.txt,1,5",6)
still launches the program but display errors.
I get the same problems when trying the same thing via a createprocess() function.
Using the ShellExecute function within the 'Shell32.dll' library ......
strPathString = "12345" & ".txt" & ",1,5"
RetVal = ShellExecute(0, "open", "C:\Program Files\FastCUT\fastcut.exe", strPathString, "C:\Program Files\FastCUT", 3)
...... everything works fine.
C:\Program Files\FastCut\FastCut 12345.txt,1,5
......from the command prompt causes no errors to be displayed and the program runs as it should.
Can anyone help.
You may find more assistance in following which specifically deals with VBA development.
Or if you are using VBA from within on of the office applications
Office Automation: office.developer.automation newsgroup
Or the Office Newgroups
Hope that helps
Microsoft is conducting an online survey to understand your opinion of the Msdn Web site. If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site.
Would you like to participate?