设有如下程序: Option Base 0 Private Sub Form_Click() Dim a Dim i As Integer a = Array(1,2,3,4,5,6,7,8,9) For i = 0 To 3 Print a(5 – i); Next End Sub 程序运行后,单击窗体,则在窗体上显示的是()
有如下VB程序段: Private Sub Command1_Click() Dim a As Long a=Val(Text1.Text) Print a End Sub 其中"Private Sub Command1_Click()"的作用是()。
有如下程序: Private Sub Command1_Click() Fo rj=1 To 10 a=a+j\7 Next j Print a End Sub 在运行时输出a的值是()
编写如下事件过程: Private Sub Form_Keydown(KeyCode As Integer, Shift As Integer) If (Button And 3) = 3 Then Print AAAA End If End Sub 程序运行后,为了在窗体上输出 “AAAA”,应按下的鼠标键为()。
窗体上有一个名称为Commad1的命令按钮,其事件过程如下:Private Sub Command1_Click()x = VisualBasicProgramminga = Right(x, 11)b = Mid(x, 7, 5)c = MsgBox(a, , b)End Sub运行程序后单击命令按钮。以下叙述中错误的是(2008年4月)
设有如下程序代码 : Dim a% Public b%, c% Private Sub Form_Click() Dim b% Print a; b; c End Sub Private Sub Form_Load() Dim a% a = 5 b = 8 c = 10 End Sub 运行程序时单击窗体 , 则在窗体上显示的是 ________ 。
假定有如下的Sub过程:Sub fun(x As Single, y As Single)t = xx = t / yy = t Mod yEnd Sub在窗体上画一个命令按钮,然后编写如下事件过程:Private Sub Command1_Click()Dim a As SingleDim b As Singlea = 6b = 4fun a, bPrint a, bEnd Sub程序运行后,单击命令按钮,输出结果为( )。
有如下程序: Private Sub Command1_Click() x = InputBox(\input value\) Select Case x Case Is > 0 y = x + 3 Case Is = 0 y = x + 2 Case Else y = x + 1 End Select Print x; y End Sub 假设运行时从键盘上输入-8,输出结果是(______)。
有如下程序代码:Private Sub Form_Click()X = 8If X > 8 ThenPrint \X > 8\ElseIf X < 10 ThenPrint \X < 10\ElseIf X = 8 ThenPrint \X = 8\End IfEnd Sub运行程序,单击窗体,输出结果是________。
编写如下程序:Private Sub Command1_Click()Dim score As Integerscore = 90If score > 80 Thenr = 5ElseIf score > 60 Thenr = 3Elser = 1End IfPrint rEnd Sub程序运行后,单击命令按钮Command1,输出结果为(______)。
编写如下程序:Private Sub Command1_Click() x="abcd" y="1234" For i=1 To 4z=z+Mid(x,i,1)+Lef
在窗体上设计如下两个事件过程: Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)Print Chr(KeyCode) End Sub Private Sub Form_KeyPress(KeyAscii As Integer)Print Chr(KeyAscii) End Sub 在程序运行后,按“a”键(不按住Shift
有如下代码: Private Sub Command1_Click()
在窗体中添加一个命令按钮,编写如下程序:Private Sub Subl(p,m,n) p=p+1:m=m+1:n=n+1 Print"su
在窗体中添加一个命令按钮,编写如下程序:Private Sub Sub1(p,m,n)p=p+1:m=m+1:n=n+1Print "sub1:
程序段如下:Private Sub Command1_ Click()a = 0for 1=15 To 15 Step- 2a = a +1Next IPrint a,
◑设有如下程序: Private Sub Form_Click() a=325456 Print Format(Int((a*10+0.5))/10,'000,000.00') End Sub 程序运行后,单击窗体,输出结果为【 】。
阅读如下程序; Private Sub Form. Click() msg1$=“继续吗?” msg2$=“操作对话框” r=MsgBox(msg1$,vbYesNo OrvbDefaultButton2,msg2$) End Sub 程序运行后,单击窗体,将产生一个信息框。此时如果直接按回车键,则相当于用鼠标单击信息框中的【 】按钮。
有如下程序:Private Sub Command1_Click()Fo rj=1 To 10a=a+j\7Next jPrint aEnd Sub在运行时输出a的值是()
在窗体上画一个文本框,名称为Text1,然后编写如下程序: Private Sub Form_Load() Open"d:empdat.txt"For Output As 1 Text1.Text=" " End Sub Private Sub Text1_KeyPress(KeyAscii As Integer) If______=13 ThenIf UCase(Text1.Text)=____
有如下程序: Private Sub Command1_Click() Dim k As Integer,m As Integer Dim p As Integer k=4:m=1 p=PC(k,m):Print p; p=PC(k,m):Print p End Sub Private Function PC(a As Integer,b As Integer) Static m As Integ
有如下程序:Option Base 1Private Sub Form Click()Dim arr,SumSum=0 arr=Array(1,3,5,7,9,11,13,15,17,19)For i=1 To 10If arr(i)/3=arr(i)//3 ThenSum=Sum+arr(i) En
在窗体中有一个文本框Test1,编写事件代码如下:Private Sub Form_Click()
设一个工程由两个窗体组成,其名称分别为Form1和Form2,在Form1上有一个名称为Command1的命令按钮。窗体Form1的程序代码如下: Private Sub Command1_Click() Dim a As Integer a=10 Call g(Form2,a) End Sub Private Sub g(f As Form, X As Integer) y=IIf(x>,10,