' Start the program.
Private Sub cmdRun_Click()
On Error GoTo ShellError
Select Case cboShellStyle.Text
Case "vbHide"
Shell txtProgram.Text, vbHide
Case "vbMaximizedFocus"
Shell txtProgram.Text, vbMaximizedFocus
Case "vbMinimizedFocus"
Shell txtProgram.Text, vbMinimizedFocus
Case "vbMinimizedNoFocus"
Shell txtProgram.Text, vbMinimizedNoFocus
Case "vbNormalFocus"
Shell txtProgram.Text, vbNormalFocus
Case "vbNormalNoFocus"
Shell txtProgram.Text, vbNormalNoFocus
End Select
Exit Sub
ShellError:
MsgBox "Error Shelling file." & vbCrLf & _
Err.Description, vbOKOnly Or vbExclamation, _
"Error"
Exit Sub
End Sub
|