Function AlphaToNumeric(str As String) As String
Try
Dim tmpSTR As String = str
Dim alphaSTR As String = "UCoOQDa(\/|IliLjzZrAusSGbBgq"
Dim numSTR As String = "0000000111111111222445566899"
For i As Integer = 1 To Len(tmpSTR)
If InStr(alphaSTR, Mid(tmpSTR, i, 1)) Then
Mid(tmpSTR, i, 1) = Mid(numSTR, InStr(alphaSTR, Mid(tmpSTR, i, 1)), 1)
End If
Next
AlphaToNumeric = tmpSTR
Catch ex As Exception
AlphaToNumeric = str
End Try
End Function
Validation scripting guide
Back to scripting overview