# Error Event

> Occurs when TXTextControl reports an error, with the error number, description, OLE status code, source, help file and CancelDisplay to show your own message.

- **Product:** TX Text Control ActiveX
- **Section:** Documentation
- **Kind:** Event
- **Path:** TX Text Control ActiveX > API Reference > TXTextControl > Error Event
- **289 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/error-event/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/error-event/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/error-event/llms-full.txt

---

Occurs when the Text Control reports an error.

### Syntax

```vbscript
Error(Number, Description, Scode, Source, HelpFile, HelpContext, CancelDisplay)
```

### Parameters

| Parameter | Description |
|---|---|
| Number | Is the error number. |
| Description | Is a corresponding error string. This string can be changed. |
| Scode | Is the OLE Status Code. |
| Source | Is the name of the module which caused the error. |
| HelpFile | Is the name of a help file. |
| HelpContext | Is the help context ID in this help file. |
| CancelDisplay | Can be set to True if the application wants to display its own error string. When this parameter is not set to True, the control will display a message box showing the error string. |

### Data Types

| Name | Data type |
|---|---|
| Number | Integer |
| Description | String |
| Scode | Long |
| Source | String |
| HelpFile | String |
| HelpContext | Long |
| CancelDisplay | Boolean |

### See Also

- [Programming Category: Control Settings](https://docs.textcontrol.com/tx-text-control-activex/reference/categories/control-settings/llms-full.txt)

---

## Nearby

- **Previous:** [EndUndoAction Method](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/endundoaction-method/llms-full.txt)
- **Next:** [FieldAtInputPos Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/fieldatinputpos-property/llms-full.txt)
