Creating Custom Check Digits

Create a custom check digit with VBScript by using an existing check digit algorithm or by creating a custom algorithm.

ClosedTo create a Custom Check Digit with VBScript using an existing algorithm

  1. Double-click the desired barcode to open the Barcode Properties dialog. Alternatively, select Properties from the object's context menu.

  2. In the Navigation Bar, select the data source containing the data to encode.

  3. Select the icon, located on the data source toolbar to launch the New Data Source Wizard.

  4. For the Type, select Visual Basic Script.

  5. Click Finish to close the New Data Source Wizard.

  6. Keeping the Script Type as Single-Line Expression, select Edit with Script Editor.

  7. Remove any existing expression text from the Editor pane.

  8. In the Script Assistant pane, expand the Functions node, followed by the Check Digit node.

  9. Double-click the desired check digit type.

  10. In the Editor pane, replace the highlighted text («String») with the share name of the data source named in Step 4, above.

  11. Click OK to close the Script Editor.

ClosedTo create a Custom Check Digit with VBScript using a custom algorithm

  1. Double-click the desired barcode to open the Barcode Properties dialog. Alternatively, select Properties from the object's context menu.

  2. In the Navigation Bar, select the data source containing the data to encode.

  3. Select the icon, located on the data source toolbar to launch the New Data Source Wizard.

  4. For the Type, select Visual Basic Script.

  5. Click Finish to close the New Data Source Wizard.

  6. Change the Script Type to Multi-Line Script.

  7. Select Edit with Script Editor to open the Script Editor.

  8. Remove any existing script text from the Editor pane.

  9. Enter a custom check digit calculation algorithm, similar to the following:

    'Create a Mod43 check digit

    charSet = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%"

    For i = 1 To Len(C39)

    total = InStr(charSet, Mid(C39,i,1)) - 1 + total

    Next

    Value = Mid(charSet, (total Mod 43 + 1), 1)

  10. Click OK to close the Script Editor.

Related Topics