A
Alain Vaillancourt
Excel crash when exiting the application with the Workbook open, if I close
the workbook before exiting the application there is no error.
I found that Excel is running the event Change of a ComboBox of a Worksheet
everytime I close, even if I didn't make any modification in any Worksheet.
If I put a breakpoint in the first line of the procedure and then stop the
execution Excel exit with no error but if I continue the execution it will
crash.
The code work with no problem while the Workbook is open but if I remove it
Excel doesn't crash anymore when exiting...
Here is the code:
Private Sub Language_Change()
Select Case UCase([Lang_ID])
Case "FR"
Sheet1.Name = "Revenus"
Sheet2.Name = "Dépenses"
Case "EN"
Sheet1.Name = "Income"
Sheet2.Name = "Expenses"
End Select
End Sub
I tried it with Excel 2000, 2002 and 2003 with the following differences:
In Excel 2000 if a change the content of any cell on a Worksheet that have
code it would not crash but it need to be a Worksheet that contain code and
not need to be the offending one but need to have some. If I change a cell
in a Worksheet without code it will still crash on exiting.
In Excel 2002 it will always crash on exiting.
In Excel 2003 it never crash at all
Thanks!
the workbook before exiting the application there is no error.
I found that Excel is running the event Change of a ComboBox of a Worksheet
everytime I close, even if I didn't make any modification in any Worksheet.
If I put a breakpoint in the first line of the procedure and then stop the
execution Excel exit with no error but if I continue the execution it will
crash.
The code work with no problem while the Workbook is open but if I remove it
Excel doesn't crash anymore when exiting...
Here is the code:
Private Sub Language_Change()
Select Case UCase([Lang_ID])
Case "FR"
Sheet1.Name = "Revenus"
Sheet2.Name = "Dépenses"
Case "EN"
Sheet1.Name = "Income"
Sheet2.Name = "Expenses"
End Select
End Sub
I tried it with Excel 2000, 2002 and 2003 with the following differences:
In Excel 2000 if a change the content of any cell on a Worksheet that have
code it would not crash but it need to be a Worksheet that contain code and
not need to be the offending one but need to have some. If I change a cell
in a Worksheet without code it will still crash on exiting.
In Excel 2002 it will always crash on exiting.
In Excel 2003 it never crash at all
Thanks!