Hello,
lets say I have a long: 345,678
I need VB to convert to a dword: 5464E
Then convert that to bytes: 4E 46 05
How?
Many thanks for any help
- Jake
Printable View
Hello,
lets say I have a long: 345,678
I need VB to convert to a dword: 5464E
Then convert that to bytes: 4E 46 05
How?
Many thanks for any help
- Jake
VB Code:
Private Type Byte4 B1 As Byte B2 As Byte B3 As Byte B4 As Byte End Type Private Type Lng L As Long End Type Private Sub Form_Load() Dim MyLng As Lng, My4Bytes As Byte4 MyLng.L = 345678 LSet My4Bytes = MyLng Me.Caption = Hex(My4Bytes.B1) & " " & Hex(My4Bytes.B2) & " " & Hex(My4Bytes.B3) & " " & Hex(My4Bytes.B4) End Sub