| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today! |
|
#1
|
||||
|
||||
|
Error Handling Options
''''IN MODULE!''''
Sub ErrHandler ErrDesc = Err.Description ErrNum = Err.Number Beep MsgBox "Error number " & ErrNum & " has occured because: " &_ ErrDesc, vbCritical, "Error" Exit Sub 'Edit the msgbox all ya want to make it ' fit your needs End Sub 'Ok, now to make my error handler work y ' ou need to 'add this right under the Sub...Examle: Private Sub Command1_Click () 'Now Here Is the code you need to add: On Error Goto ErrHandle: 'Then put ALL your code for this Sub in ' as you would 'as usual, then at the end type: ErrHandle: Call ErrHandler 'AND THATS IT! End Sub |
![]() |
| Viewing: ASP Free Forums > Programming > Code Bank > Error Handling Options |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|