How to Remove unwanted characters from a string
Posted on January 4, 2009
1 2 3 4 5 6 7 8 9 10 11 12 | 'String Manipulation - How to Remove unwanted characters from a string 'This code removes unwanted characters from a string. Function PurgeString(OldStr As String) As String Dim NewStr As String Dim l As Long For l = 1 To Len(OldStr) If Asc(Mid(OldStr, l, 1)) > 31 Then NewStr = NewStr & Mid(OldStr, l, 1) End If Next PurgeString = NewStr End Function |
Related posts:
- How to Remove all numeric characters from a string
- How to remove Duplicate characters from a string
- How to Remove all Non Alpha Numeric characters from a given string
- How to remove illegal characters from file name
- How to Strip special characters from a given String
- How to Strip/Remove Text from a given String
- How to trim characters from the Beginning of a string
- How to check if a string contains only Alphabetical Characters
- How to check if a string contains only Alpha Numeric Characters
- How to Trim all Non-printing Characters from a given String