PDA

View Full Version : Please Help - Stupid Mistake



droidap
04-17-2012, 04:45 PM
Hi I accidently copied code from one section to the wrong section of my Excel UserForm. I wrote some code that would save the Excel Sheet then close the work book that I wanted to put inside a button click. I accidently copied it into the UserForm close event. So now When I open my excel file to try to finish up the form, I can no longer get to the Developers tab b/c the UserForm is opened and If i close the UserForm it closes my workbook. SO i am stuck in a cirlce and I am not sure how to correct this. Does any have any suggestions that might help? Is there a way to edit the code outside of Excel. Or get excel to open the work book but not open the user form even though the code tells it to open?

Tinbendr
04-17-2012, 06:41 PM
When opening a file, hold the shift down should stop the macro from running.

Or Ctrl-Break will stop the macro.

Paul_Hossler
04-17-2012, 06:44 PM
1. When you open the WB, if you get the prompt to "Enable Macros" ... don't

or 2. Go to Start, Run and open Excel in Safe Mode

> <path> Excel.exe /safe

http://www.cpearson.com/excel/StartupErrors.aspx

Good luck

Paul