设计一个只接受字母键的文本框,在文本框text1中输入一串字符时,文本框text2中就即

2024年11月15日 12:27
有1个网友回答
网友(1):

Private Sub Text1_KeyPress(KeyAscii As Integer)
If Not (Asc("a ") <= KeyAscii And KeyAscii <= Asc("z ") Or _
Asc("A ") <= KeyAscii And KeyAscii <= Asc("Z ")) Then
KeyAscii = 0
End If
Text2.Text = StrReverse(Text1.Text)
End Sub