ClassMicrosoft.VisualBasic.ErrObject CreatableNo DescriptionThe Err object supplies information about a single runtime error in a Visual Basic program. It also lets you generate errors manually. Because the Err object is a shared object with global scope, you do not need to create an instance of it to use its features. When an error is generated in your applicationwhether it is handled or notVisual Basic populates the properties of the Err object with the details of the error. You can also generate custom errors through this object, to be handled by other parts of your code or by external assemblies that make use of your components. When your program reaches an Exit statement (such as Exit Function), a Resume statement, or another On Error statement, the Err object is cleared and its properties reinitialized. This can also be done explicitly using the Err.Clear method. The following table lists some of the more useful and interesting members of the Err object. Those marked with an asterisk (*) have separate entries in this chapter.
Usage at a Glance
See AlsoErl Property, Err.Description Property, Err.HelpContext Property, Err.HelpFile Property, Err.Number Property, Err.Source Property |