To tjessejeff,
You will have to have a looping function to evaluate each character.
Something like:
[tt]
Public Function strNew(value As Variant) As String
Dim i As Long
strNew = ""
For i = 1 To Len(value)
If Asc(Mid(value, i, 1)) >= 48 And Asc(Mid(value, i, 1)) <= 57 Then
' Include numbers 0 to 9
strNew = strNew + Mid(value, i, 1)
ElseIf Asc(Mid(value, i, 1)) >= 65 And Asc(Mid(value, i, 1)) <= 90 Then
' Include characters A to Z
strNew = strNew + Mid(value, i, 1)
ElseIf Asc(Mid(value, i, 1)) >= 97 And Asc(Mid(value, i, 1)) <= 122 Then
' Include characters a to z
strNew = strNew + Mid(value, i, 1)
Else
' Omit this character
End If
Next i
End Function
[/tt]
Add your own error trapping.
hth,
GGleason