Siebel VB Language Reference > Methods Reference for Siebel VB > Code Setup and Control Methods >

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:

  • 1. Normal window with focus.
  • 2. Minimized window with focus.
  • 3. Maximized window with focus.
  • 4. Normal window without focus.
  • 7. Minimized window without focus.

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.

Siebel VB Language Reference Copyright © 2015, Oracle and/or its affiliates. All rights reserved. Legal Notices.