• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Resume Statements

As listed at the beginning of the chapter, one option to consider when encountering an error is to ignore it in your program with error handling that resumes the program while bypassing the error. The On Error Resume Next statement allows the program to continue without the user seeing the error, or worse yet, having access to your program. Unfortunately, it doesn’t give any information about the error, much less how to fix it. In fact, the user doesn’t even know that the error happened. This can be dangerous.

Although there are situations that are appropriate for this statement, its use should be minimal. One example of an appropriate use of the On Error Resume Next statement is in Chapter 18, “Working with Data from External Sources,” in the section, “Using the File Dialog Method.” When you want to defer an error message or control when an error message fires, use the On Error Resume Next statement.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint