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