转换模块:
Function GetNewIDCard(IDCard)
Dim i,S,Wi,Wf,result
Wi= split("7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2",",",-1,1)
Wf= Split("1,0,X,9,8,7,6,5,4,3,2", ",",-1,1)
IDCard = Mid(IDCard, 1, 6) & "19" & Mid(IDCard, 7, 9)
S=0
For i = 0 To ubound(wi)
S = cint(Wi(i)) *cint(Mid(IDCard, i + 1, 1)) +S
Next
GetNewIDCard=IDCard & Wf(S Mod 11)
End Function
得到18位身份证号:GetNewIDCard(15位身份证号)
本页网址:
http://www.gdibn.com/newsv_89.html