1个回答
2014-12-04
展开全部
Private Sub Command1_Click()
Dim sz As Integer, zm As Integer
For I = 1 To Len(Text1.Text)
Select Case Mid(Text1.Text, I, 1)
Case "A" To "Z", "a" To "z"
zm = zm + 1
Case "0" To "9"
sz = sz + 1
End Select
Next I
Text2.Text = "字母的个数为:" & zm
Text3.Text = "数字的个数为:" & sz
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询