Home All Groups Group Topic Archive Search About
Author
24 Feb 2006 5:59 PM
DAL
How do I link a command button to a program on my computer (ie. Outlook
Express), so when I click the button the program launches. Thanks in
advance, DAL.

Author
24 Feb 2006 7:22 PM
Herfried K. Wagner [MVP]
"DAL" <dalmailbox-m***@yahoo.com> schrieb:
> How do I link a command button to a program on my computer (ie. Outlook
> Express), so when I click the button the program launches.

\\\
System.Diagnostics.Process.Start("notepad")
///

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
24 Feb 2006 7:25 PM
iwdu15
try

Dim proc As New Process
Dim SI As New ProcessStartInfo("Notepad.exe")

proc.StartInfo = SI
proc.Start()

--
-iwdu15
Author
24 Feb 2006 7:27 PM
Mike
Hai,
You can use Microsoft.VisualBasic.Shell to execute any program with a
command button.

Public Function Shell(ByVal Pathname As String, Optional ByVal Style As
Microsoft.VisualBasic.AppWinStyle = 2, Optional ByVal Wait As Boolean =
False, Optional ByVal Timeout As Integer = -1) As Integer
     Member of: Microsoft.VisualBasic.Interaction

Summary:
Runs an executable program and returns an integer containing the
program's process ID if it is still running. 

I hope it helps.