Posted on 2011-04-19
I have an excel VBA sheet that opens a workbook, does some calculations, creates a new workbook, copied over data from the first workbook, closes both workbooks and then quits.
"C:\Documents and Settings\All Users\Start Menu\Programs\Microsoft Office\Microsoft Office Excel 2007.lnk" "mysheet.xlsm"
mysheet.xlsm does the following:
Private Sub Auto_Open()
When the Subroutine is done, it does the following:
Application.DisplayAlerts = False
Upon closing, I get the following error:
Microsoft Office Excel has encountered a problem and needs to close.
Recover my work and restart Microsoft Office Excel
What is causing this to happen every time? The excel file does the calculations and creates the new workbook and saves it properly. So all the internal code is working. However, it is crashing with the error every time it is done.