【程序设计】✀题目:编写函数fun,函数的功能是:判断一个字符是 ✀字母字符、数字字符还是其他字符,并做相

2024-11-17 11:27:24
推荐回答(1个)
回答1:

Private Function fun(n As String) As String
Dim i As Long
i = Asc(n)
Select Case i
Case 48 To 57
fun = "数字"
Case 65 To 90
fun = "字母"
Case 97 To 122
fun = "字母"
Case Else
fun = "其他"
End Select
End Function