Visual Basic Reference

Visual Studio 6.0

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.


Private Sub object_LinkExecute(cmdstr As String, cancel As Integer)

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.)


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.