VB如何做退格键
答案:2 悬赏:50 手机版
解决时间 2021-04-07 13:44
- 提问者网友:聂風
- 2021-04-07 10:47
VB如何做退格键
最佳答案
- 五星知识达人网友:十鸦
- 2021-04-07 11:53
Private Sub Command1_Click()
On Error Resume Next
If IsNumeric(Mid(Trim(Text1.Text), Len(Text1.Text), 1)) = "1" Then Text1.Text = Left(Text1.Text, Len(Text1.Text) - 1)
End Sub
On Error Resume Next
If IsNumeric(Mid(Trim(Text1.Text), Len(Text1.Text), 1)) = "1" Then Text1.Text = Left(Text1.Text, Len(Text1.Text) - 1)
End Sub
全部回答
- 1楼网友:白昼之月
- 2021-04-07 13:20
Private Sub Command1_Click()
Dim t As String, c As String
t = Text1.Text
c = Right(t, 1)
If IsNumeric(c) Then
Text1.Text = Mid(t, 1, Len(t) - 1)
End If
End Sub
Dim t As String, c As String
t = Text1.Text
c = Right(t, 1)
If IsNumeric(c) Then
Text1.Text = Mid(t, 1, Len(t) - 1)
End If
End Sub
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯