Shell(pathname[,windowstyle])
The windowstyle named argument has these values:
Constant | Value | Description |
---|---|---|
Hide | 0 | Window is hidden and focus is passed to the hidden window. |
NormalFocus | 1 | Window has focus and is restored to its original size and position. |
MinimizedFocus | 2 | Window is displayed as an icon with focus. |
MaximizedFocus | 3 | Window is maximized with focus. |
NormalNoFocus | 4 | Window is restored to its most recent size and position. The currently active window remains active. |
MinimizedNoFocus | 6 | Window is displayed as an icon. The currently active window remains active. |
Remarks
If the Shell function successfully executes the named file, it returns the task ID of the started program. The task ID is a unique number that identifies the running program. If the Shell function can't start the named program, an error occurs.
Note By default, the Shell function runs other programs asynchronously. This means that a program started with Shell might not finish executing before the statements following the Shell function are executed.