Share via


Visual Basic Reference

LinkExecute Event

See Also    Example    Applies To

Occurs when a command string is sent by a destination application in a DDE conversation. The destination application expects the source application to perform the operation described by the string.

Syntax

Private Subobject_LinkExecute(cmdstrAsString, cancelAsInteger)

The LinkExecute event syntax has these parts:

Part Description
object An object expression that evaluates to an object in the Applies To list.
cmdstr The command string expression sent by the destination application.
cancel An integer that tells the destination whether the command string was accepted or refused. Setting cancel to 0 informs the destination that the command string was accepted. Setting cancel to any nonzero value informs the destination that the command string was rejected. (The default is set to -1, indicating cancel.)

Remarks

There is no required syntax for cmdstr. How your application responds to different strings is completely up to you.

If you haven't created a LinkExecute event procedure, Visual Basic rejects command strings from destination applications.