Article ID: 114554
Article Last Modified on 1/18/2007
'**********************************
'Declarations section of the module
'**********************************
Option Compare Database
Option Explicit
'===============================================================
' The following function is named IsAlpha(). It accepts a string
' argument and returns either True (-1) or False (0).
'===============================================================
Function IsAlpha (MyString As String) As Integer
Dim LoopVar As Integer
Dim SingleChar As String
LoopVar = 1
If IsNull(MyString) Then
IsAlpha = False
Exit Function
End If
For LoopVar = 1 To Len(MyString)
SingleChar = UCase(Mid$(MyString, LoopVar, 1))
If SingleChar < "A" Or SingleChar > "Z" Then
IsAlpha = False
Exit Function
End If
Next LoopVar
IsAlpha = True
End Function
IsAlpha([CategoryName]) = True
NOTE: In versions 1.x and 2.0, there is a space in Category Name.
Keywords: kbinfo kbprogramming kbusage KB114554