Function Decode_LoopData (Value As String) As Integer 'Decode raw data bytes from "loop" command to numeric value ' NOTE ' Low bit is left char in value ' High bit is right char in value If Len(Value) = 1 Then Decode_LoopData = Val("&H" + Hex$(Asc(Value))) ElseIf Len(Value) = 2 Then temp% = Asc(Left$((Value), 1)) If temp% < 16 Then Decode_LoopData = Val("&H" + Hex$(Asc(Right$(Value, 1))) + "0" + Hex$(temp%)) Else Decode_LoopData = Val("&H" + Hex$(Asc(Right$(Value, 1))) + Hex$(temp%)) End If End If