看到很多小伙伴都写了学生信息管理系统优化的博客了,总结的都详细认真,看她们总结的博客帮助了我少走了很多弯路。
文本框的代码输入
文本框只能输入数字:
Private Sub txtSID_KeyPress(KeyAscii As Integer) '只能输入数字
If KeyAscii = 8 Then
ElseIf KeyAscii < Asc("0") Or KeyAscii > Asc("9") Then
KeyAscii = 0
End If
End Sub
文本框只能输入汉子:
Private Sub txtName_KeyPress(KeyAscii As Integer)
If KeyAscii < 0 Or KeyAscii = 8 Or KeyAscii