Wednesday, 20 July 2011

Validation on aCharacter

Dim nChar,s
     s=inputbox("input name")
          nChar = Asc(s)
  
    If nChar >= 65 And nChar <= 90 Then
          msgbox "The first character is UPPERCASE"
    ElseIf nChar >= 97 And nChar <= 122 Then
          msgbox "The first character is lowercase"
         Else
          msgbox "The first character isn't alphabetical"
    End If



OUTPUT:-

1 comment:

  1. plz give the simple coding sir ,this code is too difficult for me...plz plz help me sr.....

    ReplyDelete