EXCEL Illegal Operation.
Posted by Michele on September 10, 2001 2:37 AM
I have an "EXIT" button in Sheet 1 and I have the following code for this button:
Private Sub CommandButton2_Click()
' Exit Button
I also have the following code in the Worksheet Module and I presume it also gets executed upon clicking the EXIT button.
Private Sub Workbook_Deactivate()
Application.CommandBars(1).Enabled = True
Application.CommandBars("Worksheet Menu Bar").Enabled = True
Application.CommandBars("Chart Menu Bar").Enabled = True
Application.CommandBars("Standard").Visible = True
Application.CommandBars("Formatting").Visible = True
Application.DisplayFormulaBar = True
ActiveWindow.DisplayHeadings = True
Upon clicking the Exit button, many times I end up with the message:
Title = Excel
Message = "This program has performed an illegal operation and will be shut down."
with "Close" and "Deatils" buttons.
The "Details" button gives:
"EXCEL caused an invalid page fault in Module EXCEL.EXE at 0167:3006ad15.
EAX=0000de08 CS=0167 EIP=3006ad15 EFLGS=000102216
By the way, I used to get this sort of problem with Lotus as well so I don't think it's my code that is causing this.
Does anyone know what the problem/solution is?