Dynamic Data Exchange

This was a technology introduced in Excel 95 before COM and OLE Automation to provide a method of transferring data between applications.
This technique uses what is known as a Client/Server type relationship.
Excel (and Word) are DDE Servers which means that it can send and receive data.
DDE can be used to link to real-time data, such as stock market quotes


Application.Interactive
Applications can request data from a DDE Server and the DDE Server can notify the application when the data changes.
The topics in Excel and worksheets in open workbooks
The items in Excel are cell addresses and range


There are two types of DDE data links
Warm Link - server notifies the client that the value has changed, but doesn't send the new value until the client requests it
Hot Link - server sends the changed value to the client immediately


These types of links/formulas usually contain the pipe character


DDE Server
This is a windows server that can provide data to other programs


Excel only

Application.IgnoreRemoteRequests 

This returns true if remote DDE requests are ignored



These are available in Excel,Word and Access

Application.DDETerminate 
Application.DDEExecute
Application.DDEInitiate
Application.DDEPoke
Application.DDERequest
Application.DDEAppReturnCode



Application.IgnoreRemoteRequests

Available in Excel
True if remote DDE requests are ignored
Options - Advanced Tab - "Ignore other applications that use Dynamic Data Exchange (DDE)" is unchecked


Application.DDEInitiate(App. Topic)

Available in Excel and Word
Opens a DDE channel to an application
If successful it returns the number of the open channel.


Application.DDEAppReturnCode

Available in Excel
Returns the code for the DDE acknowledged message, read-only, Long
Returns the application-specific DDE return code that was contained in the last DDE message received by Excel


Application.DDETerminate

Available in Excel and Word
Closes a DDE channel to an application
Closes all open DDE channels


Application.DDEExecute

Available in Excel and Word
Lets you execute a command in another application


Application.DDEPoke

Available in Excel and Word
Lets you send text to another application


Application.DDERequest(Channel, Item)

Available in Excel and Word
Can be used to request information from a specified application
This method always returns an array



Limitations of DDE

oDDE has a different function format from standard Excel functions.
oDDE can't use cell references in a function; everything must be hard coded.
oDDE gets confused when things are happening in Excel (for example, a calculation is taking place, a dialog box needs to be handled, and so on).
oDDE wasn't designed for getting asynchronous data in Excel in a robust and high-performance way.




© 2017 Better Solutions Limited. All Rights Reserved. © 2017 Better Solutions Limited

PrevNext