Option Explicit Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long) Dim Buffer(3) As Byte Private Sub LngToBin_Click() Dim i As Integer Dim hexData As String Dim a As Long a = Val(Text1) CopyMemory Buffer(0), a, 4 For i = 0 To UBound(Buffer) Debug.Print Buffer(i) Next End Sub Private Sub BinToLng_Click() Dim sinStr As String Dim sinSj As Long Dim i As Integer CopyMemory ByVal VarPtr(sinSj), ByVal VarPtr(Buffer(0)), 4 Text2 = sinSj End Sub Private Sub Form_Load() Text1 = "" Text2 = "" End Sub