PDA

View Full Version : Microsoft Office Excel has encountered a problem and needs to close...



Cristoforo
03-28-2012, 11:31 PM
Hi all,
I wrote a macro in Microsoft Excel 2003 SP3 and it perfectly works when I am in designing mode. If I save the file and close only the workbook (not the Excel itself) I can open it thousand times it works but if I close the Excel, too, then on the next opening a window pops up with the "Microsoft Office Excel has encountered a problem and needs to close..." message and Excel quits. If I start Excel after this and set the Macro Security to "High" then I can open my workbook without any problem. If I open the Visual Basic Editor and simple save my code, close the editor, set the macro security to "Low" and close Excel then my macro works perfectly again when I open the file (till I don't close the Excel) What can be wrong? Does anybody have some ideas how to solve it? Thanks!

Bob Phillips
03-29-2012, 02:12 AM
Cross-posted at ExcelForum http://www.excelforum.com/excel-programming/822095-microsoft-office-excel-has-encountered-a-problem-and-needs-to-close.html

Cristoforo
03-29-2012, 02:45 AM
Sorry, I have already removed it from ExcelForum

Bob Phillips
03-29-2012, 03:48 AM
Removing it should not be necessary, just tell each forum when you cross-post so that people do not waste their time trying to solve a problem that may have been solved elsewhere, or have some insightful ideas there.

Bob Phillips
03-29-2012, 03:49 AM
Not sure I will be able to help, but what is the offending code?