SendKeys "{BKSP}" 即可。
见以下例程:
Private Sub Text1_Change()
'非数字校验~~~~~~~~~~~~~~~~~~
If IsNumeric(Text1.Text) = False And Text1.Text <> "" Then
MsgBox "请输入数字!", 48, "错误提示"
SendKeys "{BKSP}" ’两个联用
End If
End Sub
Private Sub Text1_Change()
'非数字校验~~~~~~~~~~~~~~~~~~
If IsNumeric(Text1.Text) = False And Text1.Text <> "" Then
MsgBox "请输入数字!", 48, "错误提示"
SendKeys "{BKSP}"
End If
End Sub