Excel crashes when worksheet renamed

oaishm

Board Regular
Joined
Jan 30, 2009
Messages
97
This is an age old question that people everywhere have tried to solve. I didn't notice it in this forum though. How do you prevent excel from crashing when you rename a worksheet if you have udfs. You'd figure by 2010 this would be solved, but it isn't.
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Can you give more information about the nature of this problem, please?
Are you saying that the worksheet uses UDFs or that the UDF is attempting to rename a worksheet?
I have not had any such problem in my workbooks containing UDFs.
 
Upvote 0
This is an age old question that people everywhere have tried to solve. I didn't notice it in this forum though. How do you prevent excel from crashing when you rename a worksheet if you have udfs. You'd figure by 2010 this would be solved, but it isn't.

There are a couple of specific settings relating to UDFs that can cause a problem.
Individually, none of the operations/commands are an issue, but when used in the same worksheet, they will cause an Excel crash with a c0000005 exception.

Specifically, if you have a volatile function (your code function contains the "Application.Volatile (True)" tag), where you change the DisplayAlerts status (for example, "Application.DisplayAlerts = False"), then if you change the name of a worksheet within the workbook that contains a function with these two commands, Excel (up to 2010, not tested with 2013 yet) will crash.
It is possible to trigger this either by changing the sheet name in VBA code or within the interactive user session by clicking on the sheet tab and changing the name.

I am not sure if this is the cause of the problem that oaishm is having, given the lack of details, but it is one explanation of the symptom.
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,212
Members
452,618
Latest member
Tam84

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top