Table Conversion for Barcode Check Digit Follow

0
Avatar
Rod Bolt

I'm trying to calculate the below style of check digit. I'm wondering how I might be able to do the table conversion at the bottom in VB script? Would I have to use IF statements for each number? Is there an easier way of putting this conversion table into the VB scripting otherwise I'd need to check every character individually.

1 comments

0
Avatar
Andrew Rochford
Comment actions Permalink

Hey Rod,

You don't need a giant series of "If" statements for each character in the table.  Instead, you would want to use "Select/Case" for your table.  A small/quick explainer on that (including syntax) can be found here https://ss64.com/vb/select.html

Please sign in to leave a comment.