Sending data from Excel using DDE

VBA and general Excel Q&A and examples
Post Reply
noddy
Posts: 1
Joined: Thu Jan 05, 2006 2:53 pm
Location: Essex, England

Sending data from Excel using DDE

Post by noddy »

Hi

I am trying to send data by DDE link to Dplot Jr from Excel (2002 version) but when I try to initiate the link Excel complains that it 'can't execute DPLOT.EXE'.
Clicking OK brings up 'Remote data not available. Start application DPLOTE.EXE?
Clicking yes gives brings up a VBA runtime error that DPLOT.EXE cannot be run the program or one of its components is damaged or missing.

This occured when I tried to set up a quick test link ( I copied your example from the DPlot help file):

Channel = DDEInitiate("DPlot", "System")
DDEExecute Channel, "[XY(0,0)][XY(1,1)][XY(2,4)]"
DDETerminate Channel

and also tried to run your example.xls excel file but this produces the same problem. I have checked the registry entry and it seems to exist in the correct place. I have set-up a DDE link with matlab in previous Add-Ins I have created which, although it took much trial and error, worked OK so I do have a limited understanding of VBA. I have not used links to library files before and so I thought I would try the DDE link first to see how useful this could be to me before trying the dll link. I'm probably being silly and it is something obvious but I can't see it. Thanks in advance.
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

Post by DPlotAdmin »

This:

Channel = DDEInitiate("DPlot", "System")

looks for an application that's already running that responds to the DDE server and topic names "DPlot" and "System". It will not launch dplot.exe (or dplotjr.exe); you need to do that yourself within your VBA routine. If you look again at the example VBA code you'll find a function StartDPlot. You need to call that function first.
Visualize Your Data
support@dplot.com
Post Reply