Link to home
Start Free TrialLog in
Avatar of DImirC
DImirC

asked on

From Integer to Bytes

How can I get the 2 bytes values from an Interger?
ASKER CERTIFIED SOLUTION
Avatar of Brian Mulder
Brian Mulder
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of DImirC
DImirC

ASKER

Thanks,

Do you know how to make the invers process also?  from bytes to Integer?
   byte1 = CInt((CLng(int1) And &HFF00) \ 256)
    byte2 = int1 And 255
inverse process is

int1 = byte2 + (byte1 * 256)
well Hobbithouse was way faster