Thanks - trapping before the error I agree is a better way to go
Thanks again
A
"kkknie " wrote in message
...
How about trapping before the error occurs:
Dim s
Dim bFound as Boolean
bFound = False
For Each s in Sheets
If s.Name = sname Then bFound = True
Next
If bFound = True Then
Msgbox "Sheet name already entered", vbInformation
Exit Sub
End If
Sheets.Add.Name = sname
K
---
Message posted from http://www.ExcelForum.com/