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