参考代码
Dim sfz = "440881201103110638"If ValidPIN(sfz) = False Then msgbox("身份证异常")Else Dim y = Date.Today.year-cdate(ReadBirthDay(sfz)).year msgbox(y)End If