Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling An exe from VB

Status
Not open for further replies.

Barrow66

Programmer
Sep 3, 2002
37
0
0
US
How can one call another exe application from a visual basic environment using command line ?
 
Wrong forum, but have a look at:

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)

Cheers,
- Ido

CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
This might work also (depends on the EXE you want to execute)

Public Sub RunFile
Dim SomeVar as Variant

SomeVar = shell(Path & EXEFilename)
exit sub

To run an EXE (Some.EXE) which is located in the same folder as your VB6 app,:

Public Sub RunFile
Dim SomeVar as Variant

SomeVar = shell(App.Path & "\SOME.EXE")
exit sub










Crystal Reports Design/training/Consultation
ecsdata@ecsdata.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top