This should go into a module STRNGS or similar; it will be a large module when we are finished.

Please see "Code: getting started" for various tips on VBA.


Public Function boolAlphaOnly(strIn As String) As Boolean
' Procedure : boolAlphaOnly
' Description: Test if the given string contains only alphabetics.
' Copyright: Chris Greaves Inc.
' Inputs: A possibly empty string.
' Returns: TRUE if nothing other than a-z or A-Z are found
' Assumes: Nothing
' Side Effects: None.
' Tested: By the calls shown below.
boolAlphaOnly = strAlphaOnly(strIn) = strIn
'Sub TESTboolAlphaOnly()
'MsgBox boolAlphaOnly("alphabet") ' regular use
'MsgBox boolAlphaOnly("alphabetand1digit")
'End Sub
End Function