Credit Card Validation using LUHN formula

Category:
Miscellaneous
Type:
Snippets
Difficulty:
Intermediate
Author:
Jim Ryder

Version Compatibility: Visual Basic 6, Visual Basic 5

More information:
This funciton will validate credit cards using the LUHN formula and, unlike many other examples, it also checks that the length of the number is valid dependant on the card issuer.

Instructions: Copy the declarations and code below and paste directly into your VB project.

Declarations:

Code: