Fires when an error occurs in the designer component. This event allows you to create your own error handler and display localized error message boxes.
object_Error((Number As Integer, Description As String, Scode As Long, Source As String, HelpFile As String, HelpContext As Long, CancelDisplay As Boolean))
The Error event syntax has the following parts:
Part | Description |
---|---|
object | An expression evaluating to an object of type ARDesigner. |
Number | Integer - Error number |
Description | String - Error description. |
Scode | Long - Result code. |
Source | String - Source of the error if applicable. |
HelpFile | String - Help file |
HelpContext | Long - Error context id, in the help file. |
CancelDisplay | Boolean - Set CancelDisplay = True to cancel the built in error dialog and replace it with your own. |
Private Sub ARDesigner1_Error(ByVal Number As Integer, Description As String, _
ByVal Scode As Long, ByVal Source As String, ByVal HelpFile As String, _
ByVal HelpContext As Long, CancelDisplay As Boolean)
App.LogEvent Format(Now, "mm/dd/yyyy Hh:Nn") & Str(Number) & " - " & Description
CancelDisplay = True
End Sub