DDE Writing Help


Thread Starter

Sandeep Shroff

Dear List Members

I would like to read as well as write certain values from standalone VB application to a DDE servers like Excel, Wonderware Intellution etc..
using DDE as a protocol.

I have been able to successfully read the values from the DDE server. I have tried writing a value from a text box of the VB application to Excel
setting the Link Topic & Link Mode property of the textbox without any success.

Do I need to declare the form as DDE source? Or anything else is required to be done to achieve this

Any pointers in this direction would be highly appreciated



Sandeep Shroff
Sr. Consultant
Remote & Embedded Technologies

rapidEffect (P) Ltd. 25, Napier Road, Pune 411001, India
Tel./Fax. +91-20-6363250

Lewis Bodden

Hi Sandeep,

You may want to consider using DDEML instead of controls on a form. It sounds like you are using VB as a client to Excel (server). The API calls using DDEML will give you more control over the link.

Another suggestion is that you may be able to do what you want using VBA within Excel and not use a stand alone VB application.

But if you still want to use the controls then:
Once you have established a connection with a TextBox, simply change the Link Mode to Manual, change the Text Property and do a LinkPoke Method. The Excel cell will change. The LinkPoke Method generates a write back to the cell.
Text1.LinkMode = 1
Text1 = Text2
Text1.LinkMode = 2

Let me know if you need more help.

Lewis Bodden

Quick WizE Factory, Inc.
[email protected]
Hello Sandeep,
With Intellution you can buy VBA toolkit which you can use to get bi-directional data

Best regards,
Niranjan Gadgil
Stretto Enterprises

Craig Spinharney

I will be posting soon a DDE Source program that has customizable waveforms, random number generators, miscellaneous tags, and include 1 process. It is bi-directional and has been tested with Excel, Access, Word, & RSView32.