9.0

162
Assignment
Description
Reset arrayvar or user defined type array element to zero. (Dynamic arrays are reset to undimensioned arrays.)
String arrays values are set to a null string. arrayvar
must be declared as an array.
Declare with Dim, Private, Public or Static.
Declare as a parameter of Sub, Function or Property definition.
Example
Sub Main
Dim
X%(2)
X%(1) = 1
Erase X%
Debug
.Print X%(1) ' 0
End
Sub
Err Object
Syntax
Err
Group
Error Handling
Description
Set Err to zero to clear the last error event. Err in an expression returns the last error code. Add vbObjectError to
your error number in ActiveX Automation objects. Use Err.Raise or Error
to trigger an error event.
Err[.Number]
This is the error code for the last error event. Set it to zero (or use Err.Clear) to clear the last error condition. Use
Error
or Err.Raise to trigger an error event. This is the default property.
Err.Description
This string is the description of the last error event.
Err.Source
This string is the error source file name of the last error event.
Err.HelpFile
This string is the help file name of the last error event.
Err.HelpContext
This number is the help context id of the last error event.
Err.Clear
Clear the last error event.
Err.Raise [Number:=]errorcode
_
[, [Source:=]source
] _