Dim sum As Integer, i As Integersum = 0For i = 1 To 100 sum = sum + iNextDebug.Print "1 + 2 + ... + 100 ="; sum
Private Sub Command1_Click()Dim a As IntegerFor i = 1 To 100a = a + iNextPrint aEnd Sub