文本框防止非法字符輸入
只輸入整數
Private Sub Text
Select Case KeyAscii
Case Asc(\
\
Case Else
KeyAscii =
End Select
End Sub
只輸入小數:
Private Sub Text
Select Case KeyAscii
Case Asc(\
\
case Asc(\
If InStr(
Case Else
KeyAscii =
End Select
End Sub
From:http://tw.wingwit.com/Article/program/net/201311/13347.html