Public Function IsSheetNameValid(SheetName As String) As Boolean IsSheetNameValid = False ' Set Default If Len(SheetName) = 0 Then Exit Function If Len(SheetName) > 31 Then Exit Function Dim InvalidCharacters As Variant InvalidCharacters = Array("/", "\", "[", "]", "*", "?", ":") Dim x As Integer For x = LBound(InvalidCharacters) To UBound(InvalidCharacters) If InStr(SheetName, (InvalidCharacters(i))) > 0 Then Exit Function Next IsSheetNameValid = True End Function