Function to Check a string is upper case or not

This Function is an example for Checking a string is upper case or not



Public Function checkUpper(ByVal str As String) As Boolean
If Strings.StrComp(str, Strings.UCase(str)) = 0 Then
Return True
Else
Return False
End If
End Function


Comments

Author: Kapil Dhawan17 Jun 2008 Member Level: Gold   Points : 2

Hello
Nice piece of code
Thanks for sharing your knowledge with us.
I hope to see more good code from your side
This code will help lots of guys
Thanks to you
Regards,
Kapil





Author: RamyaNaidu06 Aug 2008 Member Level: Silver   Points : 1

Sub test()
Dim str As String
str = "ABCDEF"
If Strings.StrComp(str, Strings.UCase(str)) = 0 Then
MsgBox "TRUE"
Else
MsgBox "False"
End If
End Sub



  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: