文本框限制了只能输入数字,但小数点输入不了
请问如何解决这个问题?谢
[解决办法]
Private Sub Text1_KeyPress(KeyAscii As Integer)
If Not (Chr(KeyAscii) Like "[0-9.] " Or KeyAscii < 32) Then KeyAscii = 0
End Sub
[解决办法]
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 then
Text1.SelStart=0
Text1.SelLength=Len(Text1.Text)
endif
End Sub