Add integer together : Integer « Data Type « VBA / Excel / Access / Word






Add integer together

 

Sub Accumulate()
    Dim n As Integer
    Dim t As Integer
    For n = 1 To 10
        t = t + n
    Next n
    MsgBox "        The total is " & t
End Sub

 








Related examples in the same category

1.Integer number
2.Local Integer variable
3.Select Case statement with Integer value
4.Input and Output
5.Add two numbers together
6.Use If statement with Integer
7.The Integer data type is the most efficient way of handling numbers from -32,768 to 32,767
8.Overflow error