Mi hai illuinato


codice:
Function cleanString(ByVal bstr As String) As String
On Error GoTo Err_Bstr
Dim newString As String, x As Integer, b As String
    For x = 1 To Len(bstr)
        b = Mid(bstr, x, 1)
        If (Asc(b) >= 65 And Asc(b) <= 90 Or Asc(b) >= 97 And Asc(b) <= 122) Then
            newString = newString & b
        Else
        
        End If
    Next
    cleanString = newString
Exit_Bstr:
    Exit Function
Err_Bstr:
    MsgBox err.Number & "   " & err.Description
    Resume Next
End Function