Call Application Method
The Call Application method starts a Microsoft Windows application. It returns the task ID of this application, which is a unique number that identifies the running code.
The pathname argument can contain the name of any valid BAT, COM, EXE, or PIF file. You can include arguments and command line switches. If the pathname argument does not contain a valid executable file name, or if the Shell statement cannot start the code, then this method creates an error message.
Format
Shell(pathname, [windowStyle])
The following table describes the arguments that you can use with this method.
Argument | Description |
---|---|
pathname |
A string or string expression that evaluates to the name of the code to run. |
windowStyle |
One of the following integers that specifies how to display the window:
If you do not include the windowStyle argument, then Siebel VB uses the default value of 1. |
Example
The following example opens Microsoft Excel when the user clicks a button:
Sub Button1_Click
Dim i as long
i = Shell("C:\Program Files\Microsoft
Office\Office\EXCEL.EXE",1)
End Sub
For other examples, see Get Right String Method and Send Keystrokes Method.
For more information, see Send Keystrokes Method.