Option ExplicitPrivate Sub Form_Load() Text1.Text = "0"
End SubPrivate Sub Text1_Change()
If Len(Text1.Text) = 0 Then Text1.Text = "0"
End SubPrivate Sub Text1_GotFocus() Text1.SelStart = 0
Text1.SelLength = Len(Text1.Text)End SubPrivate Sub Text1_KeyPress(KeyAscii As Integer) Dim strFilter As String
strFilter = "0123456789." & vbBack
If InStr(strFilter, Chr(KeyAscii)) = 0 Then
KeyAscii = 0
End If
End Sub
End SubPrivate Sub Text1_Change()
If Len(Text1.Text) = 0 Then Text1.Text = "0"
End SubPrivate Sub Text1_GotFocus() Text1.SelStart = 0
Text1.SelLength = Len(Text1.Text)End SubPrivate Sub Text1_KeyPress(KeyAscii As Integer) Dim strFilter As String
strFilter = "0123456789." & vbBack
If InStr(strFilter, Chr(KeyAscii)) = 0 Then
KeyAscii = 0
End If
End Sub
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货