Private Sub Command1_Click() s = 0 t = 1 For i = 1 To 32 s = s + t Debug.Print i, t, s t = t * 2 Next Print s End Sub