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

2024-11-15 12:27:59
推荐回答(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