VB text1不能为零开头

来源:百度知道 编辑:UC知道 时间:2024/06/03 05:06:14
如果就一个0就可以,有两为以上的就不能是0

Private Sub Text1_Change()
If Len(Text1) > 1 And Left(Text1, 1) = "0" Then
Text1 = Mid(Text1, 2, Len(Text1))
Text1.SelStart = Len(Text1)
End If
End Sub

问题很有问题啊 text1.text 里多少个0开头都行

能不能说的在详细点?