-->
Generates a run-time error.

There is a setting within Visual Basic that was selected. Changing it resolved the issue. It had “Break on All Errors” selected. Changing to “Break on Unhandled Errors” restored the report generation features. Screen shot is attached showing the setting location in Visual Basic. Learn more about: On Error Statement (Visual Basic). 06/19/10,11:53:56 VS70pgui: 2 DepCheck indicates Microsoft Visual Studio 2010 64bit Prerequisites (x64) was not attempted to be installed. 06/19/10,11:53:56 VS70pgui: 2 DepCheck indicates Microsoft Visual F# 2.0 Runtime was not attempted to be installed. It is likely the file MathPage.WLL is not located in Office's STARTUP folder. To add it manually, please follow these steps: Visit whichever of these folders is appropriate for your bit-level of Office: C: Program Files (x86) MathType MathPage 32. C: Program Files (x86) MathType MathPage 64. Right-click the MathPage.WLL file and 'copy' it. Harassment is any behavior intended to disturb or upset a person or group of people. Threats include any threat of suicide, violence, or harm to another.

Syntax
object.Raisenumber, source, description, helpfile, helpcontext
The Raise method has the following object qualifier and named arguments:
| Argument | Description |
|---|---|
| object | Required. Always the Err object. |
| number | Required. Long integer that identifies the nature of the error. Visual Basic errors (both Visual Basic-defined and user-defined errors) are in the range 0–65535. The range 0–512 is reserved for system errors; the range 513–65535 is available for user-defined errors. When setting the Number property to your own error code in a class module, you add your error code number to the vbObjectErrorconstant. For example, to generate the error number 513, assign vbObjectError + 513 to the Number property. |
| source | Optional. String expression naming the object or application that generated the error. When setting the Source property for an object, use the form project.class. If source is not specified, the programmatic ID of the current Visual Basic project is used. |
| description | Optional. String expression describing the error. If unspecified, the value in Number is examined. If it can be mapped to a Visual Basic run-time error code, the string that would be returned by the Error function is used as Description. If there is no Visual Basic error corresponding to Number, the 'Application-defined or object-defined error' message is used. |
| helpfile | Optional. The fully qualified path to the Help file in which help on this error can be found. If unspecified, Visual Basic uses the fully qualified drive, path, and file name of the Visual Basic Help file. See HelpFile. |
| helpcontext | Optional. The context ID identifying a topic within helpfile that provides help for the error. If omitted, the Visual Basic Help file context ID for the error corresponding to the Number property is used, if it exists. See HelpContext. |
Microsoft Visual Basic Runtime Error 53 On A Mac
Remarks
All of the arguments are optional except number. If you use Raise without specifying some arguments, and the property settings of the Err object contain values that have not been cleared, those values serve as the values for your error.
Raise is used for generating run-time errors and can be used instead of the Error statement.
Raise is useful for generating errors when writing class modules, because the Err object gives richer information than is possible if you generate errors with the Error statement. For example, with the Raise method, the source that generated the error can be specified in the Source property, online Help for the error can be referenced, and so on.
Example
This example uses the Err object's Raise method to generate an error within an Automation object written in Visual Basic. It has the programmatic ID MyProj.MyObject. On the MacIntosh, the default drive name is 'HD' and portions of the pathname are separated by colons instead of backslashes.
See also
Microsoft Visual Basic Runtime Error 53 On A Windows 7
Support and feedback
Microsoft Visual Basic Runtime Error 53 On A Windows 10
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.