vb控件text1 只能输入数字1234567890和 取消Chr(8)
Private Sub text1_KeyPress(KeyAscii As Integer)
Dim strNumbers As String
strNumbers = "1234567890 " + Chr(8)
If InStr(strNumbers, Chr(KeyAscii)) = 0 Then
KeyAscii = 0
End If
End Sub
_____________________________________________________________________________ _
中磊UG二次开发教程 梅雷著 qq1821117007
学UG就上UG网 http://www.9sug.com/ |