Syntax
|
DDESend
application$, topic$, DataItem, value
|
Description
|
Initiates a DDE conversation with the server as specified by application$ and topic$ and sends that server a new value for the specified item.
|
Comments
|
The
DDESend
statement takes the following parameters:
|
|
Parameter
|
Description
|
|
application$
|
String containing the name of the application (the server) with which a DDE conversation will be established.
|
|
topic$
|
String containing the name of the topic for the conversation. The possible values for this parameter are described in the documentation for the server application.
|
|
DataItem
|
Data item to be set. This parameter can be any expression convertible to a String. The format depends on the server.
|
|
value
|
New value for the data item. This parameter can be any expression convertible to a String. The format depends on the server. A runtime error is generated if value is Null.
|
|
The DDESend statement performs the equivalent of the following statements:
??ch% = DDEInitiate(application$,topic$)
??DDEPoke ch%,item,data
??DDETerminate ch%
|
Example
|
This example sets the content of the first cell in an Excel spreadsheet.
Sub Main()
????Dim cmd,ch%
????id = Shell("c:\excel5\excel.exe",3)??'Start Excel.
??
????On Error Goto ExcelError
????DDESend "Excel","Sheet1","R1C1","Payroll For August 1995"
????Msgbox "Finished??????"
????Exit Sub
??
ExcelError:
????MsgBox "Error sending data to Excel."
????Exit Sub??'Reset error handler.
End Sub
|
See Also
|
DDEExecute (statement); DDEInitiate (function); DDEPoke (statement); DDERequest, DDERequest$ (functions); DDETerminate (statement); DDETerminateAll (statement); DDETimeout (statement).
|