ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   capture DDE update value in VBA macro (https://www.excelbanter.com/excel-discussion-misc-queries/21798-capture-dde-update-value-vba-macro.html)

chs245

capture DDE update value in VBA macro
 
Hi
I have a dde connection to a server established via the following
code:
channelNumber = Application.DDEInitiate( _
app:="BDDE", _
topic:="HIST")
returnList = Application.DDERequest(channelNumber, item$)
For i = LBound(returnList) To UBound(returnList)
Worksheets("Sheet1").Cells(i, 1).Formula = returnList(i)
Next i
Application.DDETerminate channelNumber

The DDE server first sends the value "<WFR" to tell the user that it
is working on the request, and once the data is available, it sends it
a couple of seconds later. The problem is that the macro only captures
the value <WFR, and not the data that follows a couple of seconds
later.

Is there a way to retrieve this late-incoming data via the macro ?

Many thanks in advance,

Oliver

Tom Ogilvy

what happens if you send the request twice?

--
Regards,
Tom Ogilvy

"chs245" wrote in message
om...
Hi
I have a dde connection to a server established via the following
code:
channelNumber = Application.DDEInitiate( _
app:="BDDE", _
topic:="HIST")
returnList = Application.DDERequest(channelNumber, item$)
For i = LBound(returnList) To UBound(returnList)
Worksheets("Sheet1").Cells(i, 1).Formula = returnList(i)
Next i
Application.DDETerminate channelNumber

The DDE server first sends the value "<WFR" to tell the user that it
is working on the request, and once the data is available, it sends it
a couple of seconds later. The problem is that the macro only captures
the value <WFR, and not the data that follows a couple of seconds
later.

Is there a way to retrieve this late-incoming data via the macro ?

Many thanks in advance,

Oliver





All times are GMT +1. The time now is 07:01 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com