Public Function MakeInteger%(LoByte As Byte, HiByte As Byte) If HiByte And &H80 Then MakeInteger = ((HiByte * &H100&) Or LoByte) Or &HFFFF0000 Else MakeInteger = (HiByte * &H100) Or LoByte End If End Function
LoByte = n And &HFF '<-- if n is a 2-byte Integer (left byte) HiByte = (n And &HFF00&) \ &H100 '<-- if n is a 2-byte Integer (right byte)