Skip to main content

Search

Search

Mod 11 Check Digit

Comments

1 comment

  • Avatar
    Peter Thane

    Hi Tony,

    You need to use the X MOD Y command for this.

    Here is a sample

    I have made the barcode up of 3 substrings, two of which are named as "firstbit" and "lastbit" whilst the 3rd is the VB routine.

    For the VB I have set this as an Event Controlled Script and I was using the OnSerialise option as the numbers in your example were going down and script I used was

    Value1 = Format.NamedSubStrings("firstbit").Value & Format.NamedSubStrings("lastbit").Value
    Value = Value1 Mod 11

    To this I have added an If...then....else statement to just add the 0 and not the 10 (such as for 009876008)


    If value = "10" then
    Value = "0"
    else Value = Value

    end if

    Value = Value

    0

Please sign in to leave a comment.