View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
RB Smissaert RB Smissaert is offline
external usenet poster
 
Posts: 2,452
Default How can this crash Excel?

That workbook has the right error handling setting, that is Break on
unhandled errors.
It is not the name of the sheet, but the name of the selected range.
Baffling me this.

RBS


"joel" wrote in message
...

check the error setting in VBA menu Tools - Options - general - Error
trapping.

It may be that the book that crashes has a different setting.

I think your code really wants to get the name of the sheet and I would
change the code to this

from:
If Len(Target.Name.Name) 10 Then

to:
If Len(Target.parent.Name) 10 Then


The parent of a cell or range opn a worksheet is the worksheet.


--
joel
------------------------------------------------------------------------
joel's Profile: http://www.thecodecage.com/forumz/member.php?u=229
View this thread:
http://www.thecodecage.com/forumz/sh...d.php?t=206051

http://www.thecodecage.com/forumz