Luhn Algorithm
Skip Navigation Links.

Luhn Algorithm

Skip Navigation LinksHome :: Visual Basic :: Luhn Algorithm

Here's a simple Visual Basic function you can use in Vb6+/MS Access to validate credit card numbers using the Luhn Algorithm

Call like this: CheckLuhn "009 009 776 777"
Returns this: True or False
Also requires: RemoveWhiteSpace()

Public Function CheckLuhn(ByVal lngCardNumber As String) As Boolean
'apply the Luhn algorithm
    Dim strCardNumber
    Dim I As Integer
    Dim intSumStep1Digits

The rest of this page is hidden, you must be a member to view it

To become a member and get immediate access to the course please join here Free!

Already Enrolled? please click here to Login

Next >> Day Of The Month
top of page
all content ©1996/2012 BennySutton.com
all images © their respective owners This site uses Thumbshots previews