UtterAccess HomeUtterAccess Wiki

Welcome Guest ( Log In | Register )

Custom Search
Edit Discussion
> IsAlphaOnly    

See also: GetAlphaOnly

CODE
' Code courtesy of UtterAccess Wiki
' http://www.utteraccess.com/wiki/index.php/Category:FunctionLibrary
' Original submission by Walter Niesz
' July 25, 2010
'
' You are free to use it in any application,
' provided the copyright notice is left unchanged.

' DESCRIPTION
' This function tests a given string to see
' whether it is composed of all alphabetic
' characters.

Const AllLetters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

Public Function IsAlphaOnly(StringToTest As String) As Boolean

   Dim i As Long

   IsAlphaOnly = True
   
   For i = 1 To Len(StringToTest)
       If InStr(AllLetters, Mid(StringToTest, i, 1)) = 0 Then
           IsAlphaOnly = False
           Exit Function
       End If
   Next i
   
End Function


Creative Commons License
IsAlphaOnly by UtterAccess Wiki is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Editing and revision of the content is freely encouraged; for details, see Expected Usage.

Edit Discussion
Custom Search
Thank you for your support!
This page has been accessed 9,367 times.  This page was last modified 09:37, 6 April 2011 by Jack Leach. Contributions by Walter Niesz  Disclaimers