Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is there a way to break an endless loop?

Status
Not open for further replies.

Turpis

Programmer
Apr 16, 2002
151
I have got some code in a Workbook_Open that will not quit. I have turned security to low and removed all trusted sources but it still runs and I can't get it to stop to get to the VBA (Alt F11) to remove it. I don't want to lose all the code. I need to somehow break the code cycle with a key combo or something.
Charles
Walden's Machine, Inc.
Quality Assurance/Office Developer
 
Or is there a way to open the VBA project (Excel) without actually opening Excel? That would work!
Charles
Walden's Machine, Inc.
Quality Assurance/Office Developer
 
Nope...thank the gods that file was on a server that backed up last night, I just killed it and restored. But thanks anyway.
Charles
Walden's Machine, Inc.
Quality Assurance/Office Developer
 
Have you tried holding down the shift key while opening the workbook? As a last resort, yes, you can open the VBAProject from within a different MSoft app (e.g., Word) and extract the code, but the shift approach should work.
Rob
[flowerface]
 
Click on the visual basic tab. Then press escape several times and it should stop it
Andrew 299
 
You may need to keep pressing it though. Thats how I break a loop anyway
 
I tried all that stuff to no avail. I never tried extracting the code with Word, that sounds interesting. I did however try opening it with VB6 and I don't recommend that...it destroyed the file. I guess that servers backups are pretty cool.

Thanks for all the input!
Charles
Walden's Machine, Inc.
Quality Assurance/Office Developer
 
What version of Excel?

With Excel 97, Tools/Options/General check on Macro virus protection. Then open your sheet and select Disable Macros when opening. You can then use Alt-F11.

With Excel 2000, I'm not sure, but the functionality should be there (under Security, I think.)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top