Description: This function sends a value for a specific item to a DDE server program.
Returns: Boolean
Usage: Steady State
Format: DDEPoke(Program, Topic, Item, Value)
Parameters:
Program { text
} { required } { no default
}
Any text expression
giving the name of the program which is the DDE server. This does not contain
the .EXE extension. This is usually the same as the root file name of the
executable file, but may be different as in the case of Microsoft Word for
Windows 6.0 which uses the name "MSWord".
For NetDDE, the program name is of the form "\\Computer\NDDE$" where "Computer" is the name of the computer where the DDE server program is running.
Topic { text } { required } { no default
}
Any text expression
giving the DDE topic name within the server. For a VTS server the topic name is
usually the name of the window. For Microsoft Excel, the topic is the
spreadsheet name.
For NetDDE, the topic name is the DDE share name set up in the Windows [ddeshares] section of the SYSTEM.INI file. This configuration section relates a network share name to a program name and individual topic in the DDE server. The SYSTEM.INI must be configured in the DDE server to enable NetDDE.
Item { text } { required } { no
default }
Any text
expression giving the name or location of the value to send.
Value { text } { required } {
default: null text }
Any expression for the value to be sent. If this value is invalid, a null value
(null text string) will be sent to the DDE server program.
Comments: Once the link is established, new data will be sent to the server whenever Value changes. The return value is true (1) if successful and false (0) otherwise.
Example:
success = DDEPoke("Excel", "Sheet1", "R1C1", "Connected");
Upon successful execution of this statement, the Excel spreadsheet called "Sheet1" will contain the word Connected in row 1, column 1, and success will have a value of 1. If the DDEPoke is not successful, success will be 0 and the Excel cell will retain its previous contents.
See Also: