vb在文本框中任意输入一个数字字符串,统计各个数字出现的次数。

2024-11-15 00:16:45
推荐回答(1个)
回答1:

Private Sub Command1_Click()
For i = 0 To 9
s = s & i & "出现了:" & Len(Text1) - Len(Replace(Text1, i, "")) & "次" & vbCrLf
Next
MsgBox s
End Sub