End Else
Text1.Text = \ Text1.SetFocus End If Else
MsgBox \密码帐号正确!\ End If End Sub
若在text1中输入字符串\,则程序运行结果为(B)(单) A.显示对话框,提示\密码帐号正确!\ B.显示对话框,提示\密码错误\ C.程序出错 D.没有任何提示
8.在窗体中建立一个文本框text1和一个命令按钮command1,编写下面程序: Private Sub Command1_Click( ) Dim I As Integer
If Text1.Text <> \
I = MsgBox(\密码错误\输入密码\ If I <> 4 Then End Else
Text1.Text = \
Text1.SetFocus
End If
Else
MsgBox \密码帐号正确!\
End If
End Sub
若在text1中输入字符串\,显示\密码错误\对话框,关于此对话框描述正确的是(A)(单)
A.显示对话框中有“重试”按钮
B.显示对话框中有“确定”按钮
C.显示对话框中有“是”按钮
D.以上说法都不正确
9.在窗体中建立三个文本框,名称分别为text1、text2和text3,还有一个名称为label1的标签,一个名称为command1的命令按钮,编写如下代码:
Private Sub Command1_Click( )
Dim x!, y!, z!, t!
x = Text1
y = Text2
z = Text3
If x < y Then
t = x
x = y
y = t End If If y < z Then t = y y = z z = t If x< y Then t = x x = y y = t End If End If
Label1.Caption = x & \ End Sub
当在文本框text1、text2 和 text3 中分别输入5、3和8,则标签显示的结果为(C)(单) A.3,5,8 B.5,3,8 C.8,5,3 D.3.8.5
10.以下程序段: Private Sub Form_Load( )
Dim Nop As Integer, Op As String * 1 Num1 = 3
Num2 = 2
Nop = val(Inputbox(\请输入1-4之间的整数\ Select Case Nop Case 1 Op = \
Result = Num1 + Num2 Case 2 Op = \
Result = Num1 - Num2 Case 3 Op = \
Result = Num1 * Num2 Case 4 Op = \
Result = Num1 / Num2 End Select
Label1= Num1 & Op & Num2 & \ End Sub
窗体运行后,输入1,则label1的标题显示结果为(A)(单) A.3+2=5 B.3-2=1 C.3×2=6
D.3÷2=1.5
三
1.以下程序段:
Private Sub Form_Load( )
Dim Nop As Integer, Op As String * 1 Num1 = 3 Num2 = 2
Nop = val(Inputbox(\请输入1-4之间的整数\ Select Case Nop Case 1 Op = \
Result = Num1 + Num2 Case 2 Op = \
Result = Num1 - Num2 Case 3 Op = \
Result = Num1 * Num2 Case 4 Op = \