See Also Example
Applies To
Label, picture box
Description
Specifies the data passed to a destination
Usage
[form.]{ label|picturebox|textbox}.LinkItem[ = stringexpression ]
Remarks
To set this property, specify a recognizable unit of data in an application as a referencefor example, a cell reference such as "R1C1" in Microsoft Excel.
Use LinkItem in combination with the LinkTopic To activate this link, set the LinkMode property.
You set LinkItem only for a control used as a destination. When a Visual Basic form is a source in a DDE conversation, the name of any label, picture box, or text box on the form can be the item argument in the application|topic!item string used by the destination. For example, the syntax: =VizBasicApplication|MyForm!TextBox1 represents a valid reference from Microsoft Excel to a Visual Basic application. You would enter this syntax for a destination cell in the Microsoft Excel formula bar.
Avoiding infinite loops A DDE control can potentially act as destination and source simultaneously, causing an infinite loop if a destination-source pair is also a source-destination pair with itself. For instance, a text box may be both a source (through its parent form) and destination of the same cell in Microsoft Excel. When data in a Visual Basic text box changes, sending data to Microsoft Excel, the cell in Microsoft Excel changes, sending the change to the text box, and so on, causing the loop.
To avoid such loops, use related but not identical items for destination-source and source-destination links in both directions between applications. For example, in Microsoft Excel, use related cells (precedents or dependents) to link a worksheet with a Visual Basic control, thus avoiding using a single item as both destination and source. You should document any application|topic pairs you establish if you include a Paste Link command for run-time use.
Note Setting a permanent data link at design time with the Paste Link command from the Edit menu also sets the LinkMode, LinkTopic, and LinkItem properties. This creates a link that is saved with the form. Each time the form is loaded, Visual Basic attempts to reestablish the conversation.
Data Type
String
Help:
Creating a DDE Source or Destination Link
LinkSend Method
LinkMode Property
LinkTopic Property
Using DDE
Programmer's Guide:
Chapter 20, "Communicating with Other Applications"