|
|
Returns only Alphabetical characters from a string. Related Functions: GetDigitsOnly and Strip Illegal Characters CODE ' Code courtesy of UtterAccess Wiki
' http://www.utteraccess.com/wiki/index.php/Category:FunctionLibrary ' Original submission by Walter Niesz ' September 7, 2010 ' DESCRIPTION ' This function accepts any string of characters ' and returns only letters of the alphabet. Const AllLetters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" Public Function GetAlphaOnly(InputString As String) As String Dim i As Long For i = 1 To Len(InputString) If InStr(AllLetters, Mid(InputString, i, 1)) > 0 Then GetAlphaOnly = GetAlphaOnly & Mid(InputString, i, 1) End If Next i End Function
|
| This page was last modified 09:34, 6 April 2011. This page has been accessed 1,030 times. Disclaimers |