Home > Language Reference > System Variables > ErrorMsg$

#ErrorMsg$

The #ErrorMsg$ system variable returns the error message for the error that triggered the OnAction Error procedure.

Usage

When a script is replayed with #IgnoreErrors=1, and if the script fails, the error message is not displayed. You can use #ErrorMsg$ system variable to know the error message which explains why the script failed.

Syntax

var$=#ErrorMsg$

See also

OnAction Error

Example

msgbox(#ErrorMsg$)