Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How well does VB do DDE?

Status
Not open for further replies.

JoeAtWork

Programmer
Jul 31, 2005
2,285
CA
My client is getting a new PLC device installed that they will use to record how many items they process on the floor (currently they just make tick marks on a piece of paper). The vendor has set up a spreadsheet that has DDE links to the PLC, for example in one of the cells the link is:

appdde|_ddedata!kps_serial.plc.count1

The problem with that is it does nothing to save this data automatically when a batch of work is done. I.E. when they are done one batch and want to start another, they don't want to stop work, go over to the computer, and do a Save As...

So I need to catch when a new Bill Of Lading is started, and at that point save the current Bill Of Lading information to a database.

I could probably write all my code in the Excel sheet. However, I am thinking I might have better control if I create a VB form with destination controls for the DDE links.

It's been 10 years since I wrote a VB program that used DDE. In one of my Google searches somebody claimed that DDE in VB is not very reliable and is not suitable for industrial applications.

So my question is, would a VB form with DDE destination controls be as reliable as the current Excel sheet that has DDE links?


 
I expect it would be. I still use DDE in some vb6 apps (where I have control over the Server and the Clients) and it continues to work well. However...

>So I need to catch when a new Bill Of Lading is started,
Maybe you can do that by detecting when the target cell in the Excel sheet changes in the

Private Sub Worksheet_Change(ByVal Target As Range)

End Sub

event?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top