Remove Numeric data

  • Thread starter Thread starter Mike Green
  • Start date Start date
M

Mike Green

Hi All
I am taking the text string that the user enters and passing it to a field
in another form that is opened. How do I automatically detect and remove
the numeric part of the text string if the user enters it by mistake?
Any assistance will be appreciated.
Regards
Mike Green
 
Not sure what you are doing .. but here is a user defined function that will
loop through a string and remove all numeric characters ...

Public Function fRemoveNumeric(varEntry As Variant) As String
Dim strTmp As String
Dim x As Integer

If IsNull(varEntry) Then Exit Function

For x = 1 To Len(varEntry)
If Not IsNumeric(Mid(varEntry, x, 1)) Then strTmp = strTmp & Mid(varEntry,
x, 1)
Next x

fRemoveNumeric = strTmp

End Function

R. Hicks
 
Back
Top