VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Start an exe within your app w/ error handling

by Daniel Errante (8 Submissions)
Category: Complete Applications
Compatability: Visual Basic 3.0
Difficulty: Unknown Difficulty
Date Added: Wed 3rd February 2021
Rating: (13 Votes)

starts an exe from within your application

Rate Start an exe within your app w/ error handling

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

Download this snippet    Add to My Saved Code

Start an exe within your app w/ error handling Comments

No comments have been posted about Start an exe within your app w/ error handling. Why not be the first to post a comment about Start an exe within your app w/ error handling.

Post your comment

Subject:
Message:
0/1000 characters