Author |
Topic: DDE - can I use OpenECryAddin.dll (Excel DDE addin) in VB6 app? (3 messages, Page 1 of 1) |
||||
---|---|---|---|---|---|
Moderators: VPfau | |||||
GMarshall763 Posts: 1 Joined: Jan 16, 2013 |
I have some DDe issues with a vb6 app. Went I send an order via DDE it results in 2, 3 sometimes even 7 duplicate orders.
Can I link to OpenECryaddin.dll and call the Send function in VB6 and hopefully get better results? Dim OEC As OpenECryAddin.Functions Set OEC = New OpenECryAddin.Functions Dim c As Control txtDDE.Text = OEC.Send("GMarshall256", Side, Quantity, Symbol, OrderType, Price, Price2, "None", cmbAccount.Text, "", True, c) This code thorws an Object Required error. Not sure which object. Is it the range typed last param? Or am I calling the function wrong. My old code that I am trying to replace that doesn't work ver well is: txtSendDDE.LinkItem = "Buy_1_NQH3_StopLimit_2775_2775_None_BY_" & cmbaccount.Text txtSendDDE.Text = "" txtSendDDE.LinkMode = 0 txtSendDDE.LinkTopic = "<account>|send" txtSendDDE.LinkItem = Order$ txtSendDDE.LinkMode = 1 Any suggestions? Next idea is to re-write app in OCE api com, but that might pose some more challenges... Garrett Marshall |
||||
RuslanK Posts: 69 Joined: Jun 02, 2010 |
Hello Garrett
Have you tried to pass a Range object instead of Control in the code below? txtDDE.Text = OEC.Send("GMarshall256", Side, Quantity, Symbol, OrderType, Price, Price2, "None", cmbAccount.Text, "", True, c) This should work. That range (cell) will have an order ID once order execution is started. Ruslan Kartokhin Software Developer |
||||
RuslanK Posts: 69 Joined: Jun 02, 2010 |
Also I would suggest to use Application functions to work with DDE directly.
Here is a useful link to start: http://msdn.microsoft.com/en-us/library/office/ff197893.aspx Ruslan Kartokhin Software Developer |
||||