Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel.misc
external usenet poster
 
Posts: 27,285
Default capture DDE update value in VBA macro

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   Report Post  
Posted to microsoft.public.excel.programming
O r O r is offline
external usenet poster
 
Posts: 1
Default capture DDE update value in VBA macro

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default capture DDE update value in VBA macro

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default capture DDE update value in VBA macro

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default capture DDE update value in VBA macro

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel screen capture to capture cells and row and column headings jayray Excel Discussion (Misc queries) 5 November 2nd 07 11:01 PM
How to use Macro to capture snapshots of RTD prices? GOTPAPA Excel Discussion (Misc queries) 0 August 20th 06 07:50 AM
Macro to capture worksheet names El Bee Excel Worksheet Functions 2 July 13th 06 05:56 PM
capture DDE update value in VBA macro chs245 Excel Discussion (Misc queries) 1 April 13th 05 03:31 PM
Capture Screen to *.gif file via VBA Macro [email protected] Excel Programming 3 January 26th 05 05:52 PM


All times are GMT +1. The time now is 04:32 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"