Thread: DDE Links
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
jsp jsp is offline
external usenet poster
 
Posts: 2
Default DDE Links

I am having trouble with my DDE Links. After several iterations in a Excel
VBA (MACRO) program, the DDE does not update. It seems to be worst in XP Pro
with 2007 Office. The code works reasonabely well with Vista (unbelievabele
I know). It is recieving data from InterbankFX. This is the code I'm using:

Sub ReadData(Bid(), Offer(), c, Res())

channel = DDEInitiate("MT", "BID")
Result = DDERequest(channel, "EURUSD")
Cells(15, 1) = Result

channel = DDEInitiate("MT", "ASK")
Result = DDERequest(channel, "EURUSD")
Cells(15, 2) = Result

Do

channel = DDEInitiate("MT", "BID")
Result = DDERequest(channel, "EURUSD")
Cells(16, 1) = Result

channel = DDEInitiate("MT", "ASK")
Result = DDERequest(channel, "EURUSD")
Cells(16, 2) = Result

Bid(c) = Cells(16, 1)
Offer(c) = Cells(16, 2)

Loop Until Cells(16, 2) < Cells(15, 2)

Thank!
--
JSP