<br /> &#8216;**************************************<br /> &#8216; Name: !Start an exe within your app w/error handling!<br /> &#8216; Description:starts an exe from within your application<br /> &#8216; Author: Scotto<br /> &#8216;<br /> &#8216; Inputs:None<br /> &#8216;<br /> &#8216; Returns:None<br /> &#8216;<br /> &#8216;Assumes:None<br /> &#8216;<br /> &#8216;Side Effects:None</p> <p>Sub LoadEXE(Dir As String)<br /> On Error GoTo err:<br /> X% = Shell(Dir, 1): NoFreeze% = DoEvents(): Exit Sub<br /> Exit Sub<br /> err:<br /> &#8216;make your own error messages like mine<br /> &#8216; below, or use the default:<br /> If err.Number = 6 Then Exit Sub<br /> MsgBox &#8220;Please make sure that the application you are trying to<br /> launch is located in the correct folder.&#8221;<br /> &#038; vbCrLf &#038; &#8220;If not, do this and retry launching the application.&#8221;, vbExclamation<br /> &#8216;default: MsgBox &#8220;Error:&#8221; &#038; vbCrLf &#038; err<br /> &#8216; .Description &#038; vbCrLf &#038; err.Number, vbExclamation</p> <p>End Sub

Leave a Reply