Function IDVerify(ID) t = 1 For i = 1 To 17 t = t + Val(Mid(ID,i,1)) * (2 ^ (23 - i) Mod 11) Next t = t Mod 11 If t = 10 Then IDVerify = "X" Else IDVerify = Trim(Str(t)) End If End Function