Dim str As String = "384445463945"
Dim d_lrc As Integer = 0
Dim h_lrc As String = ""
Dim l As Integer = str.Length
Dim c As Integer = 0
While c < l
Dim c_data As String = str.Substring(c, 2)
d_lrc = d_lrc + Convert.ToInt32(c_data)
c = c + 2
End While
If d_lrc >= 16 Then
d_lrc = d_lrc Mod 16
End If
h_lrc = Convert.ToInt32(Not d_lrc + 1).ToString("X")
If h_lrc.Length > 2 Then
h_lrc = h_lrc.Substring(h_lrc.Length - 2, 2)
End If
msgbox(h_lrc)