搜索

VB编程题目 SELECT CASE

发布网友 发布时间:2024-10-24 00:29

我来回答

1个回答

热心网友 时间:2024-10-31 08:19

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
声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。
E-MAIL:11247931@qq.com
Top