Author Topic: DDEInitiate Hanging Excel and MFPro  (Read 3518 times)

Tags:
  • All members
  • Posts: 10
DDEInitiate Hanging Excel and MFPro
« on: 03 Nov 2016, 12:24 »
Hi there,

I'm currently developing a spreadsheet that links into TimeMachine and need it to be able to place bets through an Excel 2007 sheet as this mimics my live trading environment.

After reading through the manual the following code is recommended for Excel to communicate with MFPro:

Sub Back(marketID As Long, selectionID As Long, price As Double, amount
As Double, handicapID as Long)
Dim feed As Integer
Dim data As String
feed = Application.DDEInitiate("FEEDER7", "betting")
If feed > 0 Then
data = "back/" & marketID & "/" & selectionID & "/" & price & "/" &
amount & "/" & handicapID
Range("AB1000") = data
Application.DDEPoke feed, "bet", Range("AB1000")
End If
End Sub


However when testing the "feed = Application.DDEInitiate("FEEDER7", "betting")"  causes both excel and MFPro to hang and I have to restart both applications and cannot get any further. I've checked on the forum and cannot see any conclusive posts on how to fix this issue other than another user has had the same thing happen.

Can anyone advise on how this can be fixed as I desperately need to get this working in order to fully implement my test trading environment. Any other workaround of how I can place bets in MFPro from Excel without using DDEInitiate more than welcome too.

Many thanks

Matt

 

Please note, BetFair is seems to be currently OFFLINE