SHELL(pathname [,windowstyle])

Returns the program's task id from running an executable programs (Double).


pathnameThe full path of the program to execute (String).
windowstyle(Optional) The constant specifying the style of the window (Integer):
0 = vbHide
1 = vbNormalFocus
2 = vbMinimizedFocus
3 = vbMaximizedFocus
4 = vbNormalNoFocus
5 = vbMinimizedNoFocus

REMARKS
* The taskID is a unique number that identifies the running program.
* If "windowstyle" is left blank, then 2 is used.
* By default this function runs other programs asynchronously.
* Specifying a windowstyle of 1 opens the application in normal size and gives it focus.
* The equivalent .NET function is Microsoft.VisualBasic.Interaction.Shell
* For the Microsoft documentation refer to docs.microsoft.com

Dim dbAppID As Double 
dbAppID = Shell("Microsoft Word", 1)
dbAppID = Shell("C:\Windows\Calc.exe", 1)

© 2019 Better Solutions Limited. All Rights Reserved. © 2019 Better Solutions Limited Top