Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
LinkError Event
Occurs when there is an error during a DDE conversation. This event is recognized only as the result of a DDE-related error that occurs when no Visual Basic code is being executed. The error number is passed as an argument.
Syntax
Private SubForm_LinkError(linkerrAsInteger)
Private SubMDIForm_LinkError(linkerrAs Integer)
Private Subobject_LinkError([indexAsInteger,]linkerrAsInteger)
The LinkError event syntax has these parts:
| Part | Description |
| object | An object expression that evaluates to an object in the Applies To list. |
| linkerr | Error number of the DDE-related error, as described in Return Values. |
| index | An integer that uniquely identifies a control if it's in a control array. |
Return Values
The following table lists all error numbers returned for the linkerr argument and a brief explanation of each error:
| Value | Description |
| 1 | The other application has requested data in the wrong format. This error may occur several times in succession as Visual Basic tries to find a format the other application recognizes. |
| 6 | The destination application attempted to continue a DDE conversation after you set the LinkMode property on your source form to 0 (None). |
| 7 | All the source links are in use (there is a limit of 128 links per source). |
| 8 | For destination controls: An automatic link or LinkRequest method failed to update the data in the control. For source forms: The destination attempted to poke data to a control and the attempt failed. |
| 11 | Not enough memory for DDE. |
Remarks
Use a LinkError event procedure to notify the user of the particular error that has occurred. You can also include code to fix the problem or troubleshooting information on reestablishing a connection or on where to go for assistance. For brief messages, use the MsgBox function.