|
-
March 22nd, 2001, 01:51 PM
#1
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
-
March 22nd, 2001, 02:06 PM
#2
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]
-
March 22nd, 2001, 03:13 PM
#3
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??
-
March 22nd, 2001, 04:26 PM
#4
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]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|