I use a function to check for special characters.
Code:
Public Function SpecialCharacters(ByRef strCheckThis As String) As Boolean
'Use the following for your msgbox. This includes spaces for readability.
'strDontWant = "/ " & ", " & "\ " & ". " & """" & " & " & "# " & "* " & "( " & ") " & ":"
Dim intCount As Integer
Dim strCompare As String
Dim strDontWant As String
Dim strFront As String
Dim strBack As String
strCompare = ""
strDontWant = "/" & "," & "\" & "." & """" & "&" & "#" & "*" & "(" & ")" & ":"
SpecialCharacters = 0
For intCount = 1 To Len(strCheckThis)
strCompare = Mid(strCheckThis, intCount, 1)
If InStr(strDontWant, strCompare) <> 0 Then
strFront = Left(strCheckThis, intCount - 1)
strBack = Mid(strCheckThis, intCount + 1, Len(strCheckThis) - intCount)
strCheckThis = strFront & "_" & strBack
SpecialCharacters = -1
End If
Next intCount
End Function