PDA

View Full Version : Excel in neverending loop



MamboKing
06-30-2008, 10:05 PM
Something bad happened to my long project.

Inadvertitely it happened that I closed and saved the Excel application I'm developing while I was still editing its VBA.

Now I cannot open it anylonger: when opening, it goes in neverending loop (CPU 95%) and does not stop.

I've weeks of works in it.

How can I open it, stop the execution and edit the VBA?

I'm in big troubles...

JimmyTheHand
06-30-2008, 10:48 PM
Pressing Ctrl+Pause(Break) keys together breaks the code execution, if it's your code that runs, e.g. automatically after opening the file.

Another possibility is to start Excel, then set macro security to high level in order to disable VBA code runnig. This way you may be able to open the file without Excel going crazy, and make backups of the sheets, forms or the code itself (e.g. into a textfile). Making backups is always a good idea, by the way.

Try these and tell us what you find. But first of all, make a copy of your workbook, and do this experimenting on the copy.

Jimmy

MamboKing
06-30-2008, 11:16 PM
You saved mu butt!! (not such elegant semantic... but it's true)

Ctrl+Pause did not work. But disabling the macros allowed me to enter into the VBA and correct the problems: a pending Else w/o If in a loop...

Before posting I tried changing the file extension to CSV but it did not help.

Thanks again!