Public Function GetValidSheetName(ByVal strOrig As String) As String
Dim varChars
Dim varItem
varChars = Array(":", "\", "/", "?", "*", "[", "]")
For Each varItem In varChars
strOrig = Replace$(strOrig, varItem, "")
Next varItem
GetValidSheetName = left$(strOrig, 31)
End Function
|