大脑皮层功能区定位:VB怎样限定输入的文本只能是正数啊?
来源:百度文库 编辑:神马品牌网 时间:2024/05/04 19:54:46
Private Sub Text1_Change()
If Text1.Text <> "" Then
tp = Asc(Right(Text1.Text, 1))
If tp < Asc("0") Or tp > Asc("9") Then
Text1.Text = Left(Text1.Text, Len(Text1.Text) - 1)
Text1.SelStart = Len(Text1.Text)
End If
End If
End Sub