| ©«¤l4901 ¥DÃD44 ºëµØ24 ¿n¤À4916 ÂI¦W267  §@·~¨t²ÎWindows 7 ³nÅ骩¥»Office 20xx ¾\ŪÅv150 ©Ê§O¨k ¨Ó¦Û¥x¥_ µù¥U®É¶¡2010-4-30 ³Ì«áµn¿ý2025-10-31 
                
 | 
                
| ¦^´_ 1# tku0216 ¨Ì·Ó¨¤ÀÃÒ¦r¸¹³W«hÅçÃÒ
 «D¦³®Ä¦r¸¹«h±Æ°£
 ¥Î¤@·s°}¦CÀx¦s¥¿½T¦r¸¹
 ½Æ»s¥N½XOption Explicit
Sub ex()
Dim A(0 To 4) As String, Ar() As String, i&, s&
A(0) = "A123456789"
A(1) = "B521632157"
A(2) = "A001"
A(3) = "A02"
A(4) = "S512935123"
For i = 0 To 4
   If Pass(A(i)) Then
      ReDim Preserve Ar(s)
      Ar(s) = A(i)
      s = s + 1
   End If
Next
MsgBox Join(Ar, Chr(10))
End Sub
Function Pass(Mystr As String) As Boolean '¦r¸¹ÅçÃÒ
Dim x, y%, k%, i%
If Asc(Left(Mystr, 1)) < 65 Or Asc(Left(Mystr, 1)) > 90 Or Len(Mystr) <> 10 Then Pass = False: Exit Function
k = Application.Match(Left(Mystr, 1), Array("A", "B", "C", "D", "E", "F", "G", "H", "J", "K", "L", "M", "N", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "I", "O"), 0) + 9
y = (k Mod 10) * 9 + Int(k / 10)
x = Array(0, 0, 8, 7, 6, 5, 4, 3, 2, 1, 1)
For i = 2 To Len(Mystr) - 1
   y = y + Val(Mid(Mystr, i, 1)) * x(i)
Next
Pass = 10 - (y Mod 10) = Val(Right(Mystr, 1))
End Function
 | 
 |