DDEInitiate question

SeraphAP

New Member
Joined
Dec 8, 2008
Messages
2
I'm using excel and VBA to grab data from an external app via DDE. I have it working well, BUT the first time the code connects to the external app(IBM Personall Communicator) I get the dialog box asking for a data source, which is always the first on the list. My end users may not understand this part. The datasource is always the same, and I'm initating the correct channel. The problem doesn't occur after the first time the external app is connected to; however, if the external app is restarted and I connect again, the "select data source" window comes up again.

Is there a way to specificy which data source you connect to by VBA code? I thought the app name and topic were enough…

code isn't anything special, but…
Code:
Dim lngWorkManagerChannel As Long
 lngWorkManagerChannel = Application.DDEInitiate("IBM327032", "SessionA") 'open channel to WorkManager

'  more code here

 DDETerminate lngWorkManagerChannel   'close channel
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Does it help if you use:
Code:
lngStart = Application.DDEInitiate("IBM327032", "System")
before your Session code?
 
Upvote 0
Afraid not - I don't work with DDE myself.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,327
Members
452,635
Latest member
laura12345

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top