views:

470

answers:

5

Hi,

From what I can see on the web, this is a fairly common complaint, but answers seem to be rarer. The problem is this:

We have a number of Excel VBA apps which work perfectly on a number of users' machines. However on one machine they stop on certain lines of code. It is always the same lines, but those lines seem to have nothing in common with one another.

If you press F5 (run) after the halt, the app continues, so it's almost like a break point has been added. We've tried selecting 'remove all breaks' from the menu and even adding a break and removing it again.

We've had this issue with single apps before and we've 'bodged' it by cutting code out of modules, compiling and then pasting it back in etc.

The problem now seems to relate to Excel itself rather than a single .xls, so we're a little unsure how to manage this.

Any help would be gratefully received :)

Thanks,

Philip Whittington

A: 

The problem now seems to relate to Excel itself

Reinstall and patch it up :) Other then that its hard to tell.

Andy
We tried a reinstall, although the user 'forgot' to reboot after the support guy did his stuff. Am trying to avoid another reinstall of Office, but this may be inevitable...Thanks
Phil Whittington
A: 

I would try the usual remedial things: - Run Rob Bovey's VBA Code Cleaner on your VBA Code - remove all addins on the users PC, particularly COM and .NET addins - Delete all the users .EXD files (MSoft Update incompatibilities) - Run Excel Detect & Repair on the users system - check the size of the user's .xlb file (should be 20-30K) - Reboot then delete all the users Temp files

Charles Williams
+1  A: 

Thanks to everyone for their input. This problem got solved by choosing REPAIR in Control Panel. I guess this explicitly re-registers some of Office's native COM components and does stuff that REINSTALL doesn't. I expect the latter just goes through a checklist and sometimes accepts what's there if it's already installed, maybe. I then had a separate issue with registering my own .NET dll for COM interop on the user's machine (despite this also working on other machines) though I think this was my error rather than Microsoft. Thanks again, I really appreciate it.

Phil Whittington
A: 

I've had this problems dozens of times, and like you, I've gone searching on the web only to find a lack of good answers in how to solve the problem. I believe the exact message I get is "Code execution has been interrupted."

I only get this error when I manually break the code execution in Excel (usually by hitting Ctrl+Break). Once that happens, I usually have to restart my computer to get it to act normal again.

Ben McCormack
A: 

Hi guys, a few of us are starting to get this problem in our office (the 'code interuption popup' appearing while any macro runs).

By the way, we're using some proprietary software (to model the products of an insurer - be nice!). The software is not related to Excel, but to fiddle with its results .txt files, we install an Excel add-in that adds more menus to Excel. But I got the error message myself without really using that software at all. And it really looks like it has nothing to do with the application in question.

Phil can you expand on how to do the 'repair' option you mentioned - did it indeed work? I'm a total layman here, so be patient.

Nobler
Hi Nobler,Sorry for the delay but I've only just seen your post.If I remember rightly, we fixed it by doing a repair of Office from control panel so that it forced a re-register of the COM classes (which re-install didn't do? - I may be wrong here). If you go to Control Panel and then to "Add or Remove Programs" (I'm in Windows XP and it's bound to be renamed in 7) and then click on Office and select repair when you run the installer.Also, it's never a bad thing to cut and paste the code from the offending VBA module into a new one and then delete the old one.Hope this helps.
Phil Whittington