Thread: DDE connection
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default DDE connection

Not sure what type of error you are getting. But (and I have no experience
with this) maybe something like this

Dim channelNumber as Variant
do
channelNumber = Application.DDEInitiate(app:="BLP", topic:="S")
loop while iserror(channelNumber)

--
Regards,
Tom Ogilvy


"Arne Hegefors" wrote:

I have a simple macro that commuincates with another program by using a dde
connection. the problem is that I get an error message almost every time time
I run the program fo rthe first time (ie a DDE connection was not established
prior to my running the macro). Thus it may be that the connection is not
"ready" the first time I try to communicate throught it. This is really
annoying..Is there any way of checking that the connection is OK? I open my
connection with:
channelNumber = Application.DDEInitiate(app:="BLP", topic:="S")
and then i get a message box that I need to click Ok. (i communicate with
the bloomberg professional if that may be of any help). thanks alot for any
help!