Re: Finding out if a given character is in UpperCase, LowerCase or Numeric
- From: Sinna <news4sinna_NOSPAM@xxxxxxxxxx>
- Date: Thu, 03 Jul 2008 08:31:11 +0200
Rick Rothstein (MVP - VB) wrote:
I seldom use the Like operator. In this case it's very readable, but in most cases (where the strength of the operator is revealed) it's hardly readable what it does in fact.I wanted to know if there is some process in vb to find out if a given
character is in UpperCase, LowerCase or Numeric.
Try this function out...
Function CharacterType(Char As String) As String
If Char Like "[A-Z]" Then
CharacterType = "Upper Case"
ElseIf Char Like "[a-z]" Then
CharacterType = "Lower Case"
ElseIf Char Like "#" Then
CharacterType = "Digit"
Else
CharacterType = "Not Alpha-Numeric"
End If
End Sub
Rick
Sinna
.
- Follow-Ups:
- Re: Finding out if a given character is in UpperCase, LowerCase or Numeric
- From: Rick Rothstein \(MVP - VB\)
- Re: Finding out if a given character is in UpperCase, LowerCase or Numeric
- References:
- Re: Finding out if a given character is in UpperCase, LowerCase or Numeric
- From: Rick Rothstein \(MVP - VB\)
- Re: Finding out if a given character is in UpperCase, LowerCase or Numeric
- Prev by Date: Re: Finding out if a given character is in UpperCase, LowerCase or Numeric
- Next by Date: Re: Finding out if a given character is in UpperCase, LowerCase or Numeric
- Previous by thread: Re: Finding out if a given character is in UpperCase, LowerCase or Numeric
- Next by thread: Re: Finding out if a given character is in UpperCase, LowerCase or Numeric
- Index(es):
Relevant Pages
|