> 其他 >
VB编程 输入一字符,判断其是否是字母,若是字母,再判断是“大写字母”还是“小写字母”
若不是字母,则输出:“非字母”.
人气:318 ℃ 时间:2020-01-23 10:55:30
解答
这个可以
Private Sub Form_Load()
Dim a As String
a = Right(InputBox("输入"),1)
Select Case Asc(a)
Case Asc("a") To Asc("z")
MsgBox "小写字母"
Case Asc("A") To Asc("Z")
MsgBox "大写字母"
Case Else
MsgBox "非字母"
End Select
End Sub
推荐
猜你喜欢
© 2024 79432.Com All Rights Reserved.
电脑版|手机版