Pressing and holding the Esc key should initiate a break. Then change to the VBA code window and the line where it breaks should be highlighted so click the Reset button (Square button) on the tool bar will stop the code completely.
VBA Excel, Infinite Loop unable to open excel and edit VBA code
I accidentally run my VBA excel in an infinite loop.
Excel hang and then it closed. Now everytime I try to open my Excel file, it ask if I want to Run in Safe Mode. When I click Yes, it shows my Excel for a while, then close again. My mouse shows loading icon during that few short seconds and I can't do anything. I can't go to VBA to edit my code. Excel just closes.
Is it because the VBA code is still running at the background? If so, how to I stop it? I even restarted and shut down my PC and I still can't open my Excel file to edit the code cuz excel will keep crashing.
The loop is a FIND of a certain word. Is there anyway to restore my code without needing to open Excel, Developer Tools > VBA?
Please assist.
I have shared my Excel workbook link. I really need someone to help me restore this project.
Microsoft 365 and Office | Excel | For home | Windows
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.