DDEInitiate locks up Excel

M

MasterMine

I'm investigating why a DDEInitiate command locks up Excel.
Specifically, I am addressing a GoldMine database though DDE as
follows:

dim ret
ret = DDEInitiate("GoldMine", "Data")

Very simple.

This happens, for instance, if GoldMine is running and I simply open
Excel, go to VBA immediate window, and type in the initiate command,
or add it as a macro and run it. Excel locks up and says "(Not
Responding)" in the title bar. I have to crash Excel to get out.

Then, if I reboot my machine, launch GoldMine, run Excel again, etc --
it works... until something mysterious happens after some period of
time, it eventually fails again.

Even if you can't reproduce this, some hints on how to troubleshoot
this would be extremely helpful.

By the way, I can then open an instance of MSWord, do the same thing
in VBA, and Word does NOT lock up. DDE functions normally and
retrieves data from GoldMine.

To further prove that this is database independent: We sometimes
experience this on one workstation, accessing GoldMine from a server,
while other workstations successfully initiate dde to the same
database from Excel (using the same program).

For a workstation that was chronically like this, we have gone so far
as to recreate the windows profile of the user on the offending
workstation (create new user, copy over old user's docs & settings,
etc) -- and that fixed the problem.
 
P

Peter T

My DDE is rusty to say the least and I don't know Goldmine, but I vaguely
recall having problems with DDE in Excel and getting Word to do 'it', eg

If wdApp is nothing then
Set wdApp = Createobject("word.application") ' or 'New Word
end if

with wdApp
nChan = .DDEInitiate("GoldMine", "Data")
..DDEExecute nChan, "blah"
..DDETerminate nChan
end with

keep or quit the wdApp

As I pasted your DDEInitiate line into the air code above I noticed it was
unqualified. Indeed Help says -

expression.DDEInitiate(App, Topic)
expression Optional. An expression that returns an Application object.

- but maybe try qualifying your DDE to Excel as I did to Word above, say

Application.DDEInitiate("GoldMine", "Data")

Regards,
Peter T
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top