Jasper,
The method below will work. It may also be possible to call BOM.exe
directly in the subroutine cmdRunBOM_Click() with the line "RunJob
"BOM.exe"
but you would have to experiment with that.
1) Create a BATCH file (with NOTEPAD) called RUNBOM.BAT - for the purpose
of
this example I assume you will put it in C:\BATCH
Batch file needs one line (you may need to specify the path):
C:\[whatever location BOM.exe is in]\BOM.EXE
2) Then copy these two routines to your VBA module:
Private Sub cmdRunBOM_Click()
RunJob "C:\BATCH\RUNBOM.BAT"
End Sub
Sub RunJob(Command As String)
Dim varProc As Variant
varProc = Shell(Command, 6)
End Sub
3) Then the event "on click" for your button is the subroutine:
cmdRunBOM_Click()
Jasper Recto said:
I need to make a macro that will launch an executable. I want to attach
it
to a button so clicking the button will launch another program.
Is this possible?
Thanks,
Jasper