Is there a VB function I can use to parse alpha characters from a string.
Example: String: "ARM7196"
I need to parse ARM so that my string is equal to "7196".
Printable View
Is there a VB function I can use to parse alpha characters from a string.
Example: String: "ARM7196"
I need to parse ARM so that my string is equal to "7196".
Is your string always AAANNNN?
Do you mean does the string always start with Alpha characters? If so, yes however there maybe alpha characters at the end of the string also. Example: "ARM7196C"
Code:Const MYSTRING = "ARM1234C"
Dim intIndex As Integer
Dim strNew As String
For intIndex = 1 To Len(MYSTRING)
If IsNumeric(Mid$(MYSTRING, intIndex, 1)) Then
strNew = strNew & Mid$(MYSTRING, intIndex, 1)
End If
Next
MsgBox strNew