Tools Links Login

Start an exe within your app w/ error handling!

starts an exe from within your application

Original Author: Daniel Errante

Code

Sub LoadEXE(Dir As String)
On Error GoTo err:
X% = Shell(Dir, 1): NoFreeze% = DoEvents(): Exit Sub
Exit Sub
err:
'make your own error messages like mine below, or use the default:
If err.Number = 6 Then Exit Sub
MsgBox "Please make sure that the application you are trying to launch is located in the correct folder." & vbCrLf & "If not, do this and retry launching the application.", vbExclamation
'default: MsgBox "Error:" & vbCrLf & err.Description & vbCrLf & err.Number, vbExclamation

End Sub

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 161 times

Categories

Visual Basic 6

Attachments

No attachments for this post


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.