Function Checksums Class

Checksum8

"8-bit Checksum" Generate the 8-bit checksum for the characters in string vValue. The checksum is the sum of the ASCII values of all of the characters within the string. Checksum is returned as a one-character string. Uses modulo addition so that the function will return the 8 least significant bits of the sum.

Signature (Visual Basic / VBA)

Public Function Checksum8( _
    ByVal vValue As Variant _
    ) As Variant

Code Example

    Checksum8("A") = "A"
    Checksum8("ABCD") = Chr$(10)
    Checksum8("BADC") = Chr$(10)

Parameters

Parameter Description
vValue String containing the characters whose ASCII values are to be added together. Function returns Null if vValue is Null or cannot be fixed up to a String.

Notes & Version History

Note Function currently only works for characters whose ASCII value is between 0 and 255, so it does NOT support UNICODE.