ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel crash when exiting with the Workbook open (https://www.excelbanter.com/excel-programming/397118-excel-crash-when-exiting-workbook-open.html)

Alain Vaillancourt

Excel crash when exiting with the Workbook open
 
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...

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 and Excel 2002 with the following difference:

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 closing.

In Excel 2002 it will always crash on closing.

Thanks!
Alain


Curtis Gaylord

did you find a solution
 
did you find a solution?

EggHeadCafe - .NET Developer Portal of Choice
http://www.eggheadcafe.com

Curtis Gaylord

did you find a solution
 
did you find a solution?

EggHeadCafe - .NET Developer Portal of Choice
http://www.eggheadcafe.com

Alain Vaillancourt

did you find a solution
 
Yes thanks, I use now the Click event and it doesn't crash anymore.


"Curtis Gaylord" wrote in message
...
did you find a solution?

EggHeadCafe - .NET Developer Portal of Choice
http://www.eggheadcafe.com




All times are GMT +1. The time now is 07:26 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com