发布网友 发布时间:2024-10-24 00:29
共1个回答
热心网友 时间:2024-11-09 22:37
Private Sub Command1_Click()
Dim i%
If Len(Text1) <> 11 Then MsgBox "手机号为11位!": Text1 = "": Exit Sub
If IsNumeric(Text1) = False Then MsgBox "请输入数字!": Text1 = "": Exit Sub
i = Val(Mid(Text1, 3, 1))
Select Case i
Case Is <= 3
MsgBox "联通"
Case Else
MsgBox "移动"
End Select
End Sub
Private Sub Command2_Click()
End
End Sub
Private Sub Form_Load()
Text1 = "13"
Text1.MaxLength = 11
Command1.Caption = "确定"
Command2.Caption = "取消"
Label1.Caption = "请输入手机号码:"
End Sub