ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   DDE connection (https://www.excelbanter.com/excel-programming/373703-dde-connection.html)

Arne Hegefors

DDE connection
 
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!



Tom Ogilvy

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!




All times are GMT +1. The time now is 12:06 PM.

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