【发布时间】:2014-03-15 19:39:55
【问题描述】:
您能帮我验证电话号码吗?我已经验证它有 11 个字符,但我不知道如何使第一个字符为 0 的条件。
谢谢!
代码如下:
Do
tel_no(n) = InputBox("Enter the telephone number")
If Len(tel_no(n)) < 11 Or Len(tel_no(n)) > 11 Then
MsgBox("The telephone number should have 11 digits and should start with 0")
End If
Loop Until Len(tel_no(n)) = 11
【问题讨论】: