ÒÔ ÏÂ ÊÇ ÎÒ ¶Ô ´Ë ÎÊ Ìâ µÄ ½â ¾ö °ì ·¨ £¬ ÓÉ ÓÚ Ê± ¼ä ²Ö ´Ù £¬ ²» ÊÇ ºÜ Íê ÉÆ : 
    Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer) 
    Dim len1 As Integer 
    Dim ss As String 
    Dim i As Integer 
     
    i = 1 
     
    Do 
    ss = Mid$(Text1.Text, i, 1) 
    If ss < "Z" And ss > "a" Then 
     len1 = len1 + 1 
    Else 
     len1 = len1 + 2 
    End If 
    i = i + 1 
    If i > Len(Text1) Then 
     Exit Do 
    End If 
    Loop 
     
    If len1 > 20 Then MsgBox "No" 
    End Sub 
<END>
