Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming,microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming,microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If i send the request twice, i will still only get <WFR as my initial
answer. it would be nice to kind of "listen" to a dde connection from within an excel macro. *** Sent via Developersdex http://www.developersdex.com *** |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Apparently DDE is asynchronous, but VB/VBA is not designed to work that way.
You might go to this page http://www.angelfire.com/biz/rhaminisys/ddeinfo.html Read down to the DDEML section. They have a link embedded there to a page that talks about VB and DDE and that link does talk about asynchronous processing in VB - their solution is to use their controls. http://www.angelfire.com/biz/rhaminisys/ddclient.html for the client. Looks like it is free. -- Regards, Tom Ogilvy "O r" wrote in message ... If i send the request twice, i will still only get <WFR as my initial answer. it would be nice to kind of "listen" to a dde connection from within an excel macro. *** Sent via Developersdex http://www.developersdex.com *** |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
One more link about VBA and the client control specifically:
http://www.angelfire.com/biz/rhaminisys/ddclvba.html -- Regards, Tom Ogilvy "O r" wrote in message ... If i send the request twice, i will still only get <WFR as my initial answer. it would be nice to kind of "listen" to a dde connection from within an excel macro. *** Sent via Developersdex http://www.developersdex.com *** |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Tom,
seems to me that most of the developer community has given-up on DDE years ago. The software found on your link seems to solve the problem though. Best regards, OLiver "Tom Ogilvy" wrote in message ... One more link about VBA and the client control specifically: http://www.angelfire.com/biz/rhaminisys/ddclvba.html -- Regards, Tom Ogilvy "O r" wrote in message ... If i send the request twice, i will still only get <WFR as my initial answer. it would be nice to kind of "listen" to a dde connection from within an excel macro. *** Sent via Developersdex http://www.developersdex.com *** |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel screen capture to capture cells and row and column headings | Excel Discussion (Misc queries) | |||
How to use Macro to capture snapshots of RTD prices? | Excel Discussion (Misc queries) | |||
Macro to capture worksheet names | Excel Worksheet Functions | |||
capture DDE update value in VBA macro | Excel Discussion (Misc queries) | |||
Capture Screen to *.gif file via VBA Macro | Excel Programming |