I need to use VB to call another application using a button. Plesae help!!!!
Printable View
I need to use VB to call another application using a button. Plesae help!!!!
When you say call, do you mean open? If so, there's no need for API.
VB Code:
Shell "SomeApp.exe", 1
:)
Use shell execute api
VB Code:
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long Private Const SW_SHOWNORMAL = 1 Private Sub Command1_Click() ShellExecute Me.hwnd, vbNullString, "MyProg.Exe", vbNullString, "C:\Program Files\MyFolder\", SW_SHOWNORMAL End Sub