'---------------------------------------------------------------------------------------
' Procedure : CheckName
' Purpose : Функция проверки правильности имени
'---------------------------------------------------------------------------------------
Function CheckName(sName As String)
Dim objRegExp As Object
Dim s As String
Set objRegExp = CreateObject("VBScript.RegExp")
objRegExp.Global = True: objRegExp.IgnoreCase = True
objRegExp.Pattern = "[:,\\,/,?,\*,\<,\>,\',\|,""""]"
s = objRegExp.Replace(sName, "")
CheckName = s
End Function