September 2001
Beginner
528 pages
11h 59m
English
You can mimic the occurrence of a VBA error by using the Raise method of the Err object. When you execute this method, VBA reacts exactly as if a “real” error had occurred, but the error number and other information are specified by you. The syntax for Raise is
Err.Raise number, source, description, helpfile,
helpcontext
number is the only required argument. It specifies the number of the error and it can be any value in the range 0–65,535.
source is an optional argument specifying the source of the error. If omitted, the programmatic ID of the current project is used.
description is a string describing the error. If description is omitted, then number is compared with VBA's predefined errors. If it matches one, the corresponding ...
Read now
Unlock full access