Starts another application and defines the respective window style, if necessary.
Shell (Pathname As String[, Windowstyle As Integer][, Param As String][, bSync])
Complete path and program name of the program that you want to start.
Optional integer expression that specifies the style of the window that the program is executed in. The following values are possible:
Windowstyle | Meaning |
---|---|
0 | The focus is on the hidden program window. |
1 | The focus is on the program window in standard size. |
2 | The focus is on the minimised program window. |
3 | focus is on the maximised program window. |
4 | Standard size program window, without focus. |
6 | Minimised program window, focus remains on the active window. |
10 | Full-screen display. |
Any string expression that specifies the command line that want to pass.
If this value is set to true, the Shell command and all Office tasks wait until the shell process completes. If the value is set to false, the shell returns directly. The default value is false.
5 Invalid procedure call
53 File not found
73 Not implemented
Sub ExampleShellForWin
Shell("c:\windows\calc.exe",2)
End Sub