Private Sub Command1_Click()
Dim a(0 To 9) As Integer
For i = 1 To Len(Text1.Text)
a(Val(Mid(Text1.Text, i, 1))) = a(Val(Mid(Text1.Text, i, 1))) + 1
Next i
For i = 0 To 9
Label1(i) = "数字" & i & "出现" & a(i) & "次"
Next i
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If (KeyAscii < Asc("0") Or KeyAscii > Asc("9")) And KeyAscii <> 8 Then
KeyAscii = 0
Beep
End If
End Sub
牙膏\5:看不懂吧?!