Private Sub Form-Click()
Dim S As Integer
Dim N As Integer
N=0
S=0 ‘S变量存放的是总和
Do While (条件)
N=N+1
S=S+N
Loop
Text1. Text=Str()
End Sub