Attempts to store the numbers 52 and 5.2 in a variable declared as type Byte. : Byte « Data Type « VBA / Excel / Access / Word






Attempts to store the numbers 52 and 5.2 in a variable declared as type Byte.

 
Sub ByteDemo()
    Dim myVar As Byte
    myVar = 52
    Debug.Print myVar
    myVar = 5.2
    Debug.Print myVar
End Sub

 








Related examples in the same category

1.You should also be careful about mixing numerical data types in mathematical operations