Function Windows API Class

HIBYTE

"High Byte" Return the high-order byte of an Integer value. Return the Byte value whose in-memory representation is the same as the left-most, most-significant-byte of Integer value vValue.

Signature (Visual Basic / VBA)

Public Function HIBYTE( _
    ByVal vValue As Integer _
    ) As Byte

Code Example

    HIBYTE(513) = 2
    HIBYTE(258) = 1
    HIBYTE(-2) = 255
    HIBYTE(-257) = 254

Notes & Version History

Note Use the CoerceTwoBytesToInteger function to reconstruct an Integer from two Byte values.
Note Similar to but faster than using the MakeInteger and CoerceToByte functions.