0
votes

I have exactly the problem described here:

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.

I have managed to resolve it with the accepted answer, but now, when I send the VBA file to my colleagues, they have the same problem.

My question and my problem is - any ideas what to do, as far as it is really not a good idea to go to everyone and to debug every time. And I somehow do not want to add Application.EnableCancelKey = xlDisabled to my macros.

1

1 Answers

1
votes

Sounds like a ghost break. File saved one time with a break in there. What has worked for me in the past was to remove any breaks you see and manually step through the code (F8) through completion and then save file. Prob now necessay to step all the way through but I like to know I went all the way and didn't miss any.