Try this one...
Code:
Option Explicit
Private Sub Form_Load()
Debug.Print CalcChecksum("Hello World!")
End Sub
Public Function CalcChecksum(S As String) As Byte
Dim chk As Byte ' Final Checksum
Dim T As Long ' Char-pointer...
' Step 1
chk = Asc(Mid(S, 1, 2)) ' Get first Char value
' Initialize counter
T = 1
While T < Len(S)
' Step 2
chk = chk And 127 ' Bitwise operation. Clear bit 7 (127 -> 0111 1111)
' Step 3
chk = chk Or 64 ' Bitwise operation. Set bit 6 (64 -> 01000000)
' Increase counter...
T = T + 1
' Step 4
chk = Asc(Mid(S, T, 1)) + chk
Wend
CalcChecksum = chk
End Function
Hope it works for you...