Public Function fGetNums(StrText As String) As String
Dim NumLen As Long
Dim strFinalText As String
Dim i As Long
NumLen = Len(StrText) 'Get the length of the string that you passed in
strFinalText = "" 'This string variable starts out empty
'Now your big loop which loops through each character in the string,
'determines whether or not the character is a number, and then either adds
'or rejects that character based on whether or not it passes the number validation
For i = 1 To NumLen 'Loop starts at 1 and goes until the max string length
If IsNumeric(Mid(StrText, i, 1)) Then 'Test if is numeric or not
strFinalText = strFinalText & Mid(StrText, i, 1) 'Numeric; add character
Else
strFinalText = strFinalText 'Not Numeric; reject character
End If
Next i 'Go to next character
fGetNums = strFinalText 'Function result of strFinalText after loop
End Function