12-02-2010, 12:40 PM
Hi there,
You can use this way to get any number(s) from a string
Ngoc Vo
You can use this way to get any number(s) from a string
Code:
Public sub s_GetNumberFromString (strText, byref colNum)
Set ObjRegExp = New RegExp
ObjRegExp.Pattern = "\d+"
ObjRegExp.Global = True
Set colNum = ObjRegExp.Execute(strText)
End Sub
Dim colNum
s_GetNumberFromString strNormal, colNum
For each intNum in colNum
MsgBox intNum
Next
Ngoc Vo