Private Sub Command1_Click()
Label1.Caption = ""
n = CLng(InputBox("请输入一个100以内的正整数"))
For i = 1 To n
Label1.Caption = Label1.Caption & Format(i, "@@@@") '让数字对齐
If i Mod 10 = 0 Then Label1.Caption = Label1.Caption & vbCrLf '每行显示10个
Next i
End Sub
温馨提示:答案为网友推荐,仅供参考