Please Help - Trying to launch a program within VB...
I am writing an application that should launch an instance of another windows application, say Microsoft WORD. I have been able to launch the program from my code outside of the application, but I am trying to launch it within the application itself... in a control of some sort. Is this possible?? If it is, can someone help??
Thanks,
Ron
Re: Please Help - Trying to launch a program within VB...
'this sample will launch notepad.exe and wait until user closes it to continue execution
Function MyFunc()
Dim myObject As Object
Dim RetVal As Variant
Set myObject = CreateObject("WScript.Shell")
RetVal = myObject.Run("c:\windows\notepad.exe", 1, True)
MsgBox "Notepad is closed"
End Function
'TRue - wait until proc is over
'False don't wait
Iouri Boutchkine
[email protected]
Re: Please Help - Trying to launch a program within VB...
Can this parameter be added for other applications as well? I am actually trying to launch another Windows application. What extactly is the WScript.shell??
Re: Please Help - Trying to launch a program within VB...
You can use it for any window application. WSShell is a window script host object. If you need you can find info in Microsoft knowledgebase
Iouri Boutchkine
[email protected]