Private Sub Command1_Click() Dim i As Integer Dim s As Integer For i = 1 To 100 If i Mod 2 <> 0 Then s = s + i End If Next MsgBox sEnd Sub