J
JDB
Good Morning from San Diego;
I am having problems using the WinExec function when I call for a file
to be run when there are blank spaces in the path.
I am attaching 2 subroutine calls; The first on works, the second one
does not, and it is because of the blank spaces.
Any help or suggestions welcomed.
JDB
1. Works
---------------
Sub ExecMplFile()
Dim RetVal
Dim strProgDirectory As String
Dim strFileDirectory As String
Dim strFile As String
strProgDirectory = "c:\mplwin4\mplwin42.exe solve "
strFileDirectory = "C:\Albacora\Albacora.mpl"
strFile = strProgDirectory & strFileDirectory
Call WinExecWait(strFile)
msgbox "Finished Albacora"
End Sub
2. Does NOT work
-------------------------------------------------------------------------------
Sub ExecMplFile()
Dim RetVal
Dim strProgDirectory As String
Dim strFileDirectory As String
Dim strFile As String
strProgDirectory = "c:\mplwin4\mplwin42.exe solve "
strFileDirectory = "C:\Documents and Settings\jdebeer\My Documents
\10_LP_Problems\MPL_Files\Albacora_Test\Albacora.mpl"
strFile = strProgDirectory & strFileDirectory
msgbox strFile
Call WinExecWait(strFile)
msgbox "Finished Albacora"
End Sub
I am having problems using the WinExec function when I call for a file
to be run when there are blank spaces in the path.
I am attaching 2 subroutine calls; The first on works, the second one
does not, and it is because of the blank spaces.
Any help or suggestions welcomed.
JDB
1. Works
---------------
Sub ExecMplFile()
Dim RetVal
Dim strProgDirectory As String
Dim strFileDirectory As String
Dim strFile As String
strProgDirectory = "c:\mplwin4\mplwin42.exe solve "
strFileDirectory = "C:\Albacora\Albacora.mpl"
strFile = strProgDirectory & strFileDirectory
Call WinExecWait(strFile)
msgbox "Finished Albacora"
End Sub
2. Does NOT work
-------------------------------------------------------------------------------
Sub ExecMplFile()
Dim RetVal
Dim strProgDirectory As String
Dim strFileDirectory As String
Dim strFile As String
strProgDirectory = "c:\mplwin4\mplwin42.exe solve "
strFileDirectory = "C:\Documents and Settings\jdebeer\My Documents
\10_LP_Problems\MPL_Files\Albacora_Test\Albacora.mpl"
strFile = strProgDirectory & strFileDirectory
msgbox strFile
Call WinExecWait(strFile)
msgbox "Finished Albacora"
End Sub