1. 如果你只是纯粹要达到题目要求
Dim a As Integer
a = 0
do while a<=100
a=a+1
loop
2. 如果你想显示在屏幕上
Dim a As Integer
a = 0
do while a<=100
a = a+1
Print a
Loop
3. 如果你想在用户单机单机窗体是显示出来
Private Sub Command1_Click()
Dim a As Integer
a = 0
do while a<=100
a = a+1
Print a
Loop
End Sub
如果你还有什么想法可以提出来大家讨论一下
Dim i As Integer
Dim s As Integer
Do While (i <= 100)
s = s + i
i = i + 1
Loop
MsgBox CStr(s)