On Error GoTo (Church web hosting) label|0|-1 label Use: Either label,
Friday, December 29th, 2006On Error GoTo label|0|-1 label Use: Either label, 0, or -1 is required A valid label within the subroutine Syntax 2 On Error Resume Next Description Enables or disables error handling within a procedure. If you don’t use an OnError statement or a Try…Catch block in your procedure, or if you have explicitly switched off error handling, the Visual Basic runtime engine will automatically handle the error. First, it will display a dialog box containing the standard text of the error message, something that many users are likely to find incomprehensible. Second, it will terminate the application. So any error that occurs in the procedure will produce a fatal runtime error. Rules at a Glance Syntax 1 The 0 argument disables error handling within the procedure until the next OnError statement is executed. The -1 argument disables an enabled exception in the current procedure. (It resets the exception to Nothing). The label argument specifies the label that defines an error-handling routine within the current procedure. Should an error occur, the procedure will be branched to this error-handling routine. A subroutine label must be suffixed with a colon. In addition, you cannot use a VB reserved word for a subroutine label name. For example: someroutine: label must be in the same procedure as the OnError statement. Syntax 2 When a runtime error occurs, program execution continues with the program line following the line that generated the error. Programming Tips and Gotchas If you have no error handling in your procedure or if error handling is disabled, the VB runtime engine will trace back through the call stack until a procedure is reached where error handling is enabled. In that case, the error will be handled by that procedure. However, if no error handler can be found in the call stack, a runtime error occurs, and program execution is halted. OnErrorResumeNext is useful in situations either where you are certain that errors will occur or where the errors that could occur are minor. The following example shows how you can quickly cycle through the controls on a form and set the Text property to an empty string without checking what type of control you’re dealing with. Of course, you are aware that many of the controls don’t have a text property, so that the attempt to access their Text property will
Hint: If you are looking for very good and affordable webspace to host and run your tomcat hosting application check Sandzak.com tomcat web hosting provider