Private Sub Command1_Click() Dim I As Long Dim crc As Long Dim buffer(6) As Long Dim data Dim a Dim polynom buffer(0) = &H10 buffer(1) = &H8 buffer(2) = &HB5 buffer(3) = &H4 buffer(4) = &H1 buffer(5) = &H0 crc = 0 For I = 0 To UBound(buffer) - 1 data = buffer(I) For a = 0 To 7 If crc And &H80& Then polynom = &H9B& Else polynom = &H0& End If crc = (crc And Not &H80&) * 2 If data And &H80& Then crc = crc Or 1 crc = crc Xor polynom data = data * 2 Next a Next I Text1 = Hex$(crc) End Sub