Excel hangs when running macro a specific PC only

Copper Contributor

I have a DDE-enabled spreadsheet with a large number of macros. The spreadsheet comes from a 3rd party, and it first needs to connect via API with the 3rd party after running something called DdeSocketBridge. Once the connection is established, the macros can be run.

 

So my problem is that this spreadsheet works perfectly fine on my laptop (PC2) but not on my desktop (PC1). Both PCs are running similar builds of MS365 in 64-bit. In Excel, I have also checked the various Options (General, Add-ins, Trust Center, etc) and they are indentical on both PCs. Both are connected via WiFi on the same network.

 

When I try to run one of the macros on the spreadheet on PC1 (e.g. RequestCurrentTime), Excel hangs and I get the circular thingy. I have to use Task Manager to shut Excel down. No error messages. On PC2 I have no problems.

 

Here's what I have tried so far on PC1:

 

1. Uninstalled the API, and then re-installed it. Both PCs are running the same versions of the API.

2. Repaired MS 365 on PC1, but this did not resolve the problem.

3. Uninstalled MS365 on PC1, and then re-installed it. I used Revo Uninstaller to uninstall, which also identifies relevant file, folders, etc for deletion.

 

I did troubleshooting with the 3rd party, but since the spreadsheet works OK on PC2, they weren't able to help much other than suggesting uninstalling/re-installing the API (using Revo).

 

This spreadsheet did work on PC1 for some time, but stopped working about a week ago. I have been scratching me head, and have tried multiple things (as above) without much help.

 

Would appreciate any suggestions on resolving it as PC1 is my main PC, and I really need it to work on it. Many thanks.

 

JD

6 Replies
Once Excel appears to hang, can you right-click it's button on the task-bar and choose close window? What happens if you do?
Hi Jan, thanks for your reply. Upon doing what you suggest (but after doing it 2x), the "MS Excel is Not Responding" window opens with 3 choices.

I clicked Close, which then leads to the "Hang on while Windows reports the problem to MS". Excel then closes.

When I then re-open the file, there is a Document Recovery pane. However, the file in there looks identical with the one initially open. In the pane, there was a link which when clicked said there were no errors found.

I tried multiple times without any success, and no resolution.
I seem to recall that a DDE link can be resource-hungry, perhaps that is the issue? Without knowing more about the code I cannot advise more.
Thanks Jan. The thing is the "problem" PC is more powerful than my laptop (PC2) on which the spreadsheet works just fine. So I'm not sure it's an issue with resources.
Can you post the code of the macro you mentioned which makes Excel "Hang"? (be sure to remove any sensitive information such as credentials and API keys)
After further troubleshooting with the 3rd party, I've been able to fix the problem. It was due to an Excel Add-in from another provider. This Add-in is also installed on PC2, which has no problems, and so it was not clear initially that this was the issue. However, I disabled this Add-in on the problem PC, and the spreadsheet began to work without any issues. Thereafter, I re-enabled the Add-in, and the spreadsheet is still working. So was the Add-in really the issue? Who knows! One of those things I guess ...

Jan, many thanks again on replying with your suggestions. Have a great day.