运行下列程序:Private Sub form_Click( )Dim sl As String, s2 As Strings1 = "12341234m = 0For i = 3 To 1 Step -1m = m + 1s2 = fun1(s1, m)Debug.Print s2;Next iEnd SubPrivate Function fun1(x, y) As Stringfun1 = Right(x, y)End Function单击窗体后,则在立即窗口内显示结果是( )。A.1234B.4321C.434234D.1111

运行下列程序:Private Sub form_Click( )Dim sl As String, s2 As Strings1 = "1234&quo

运行下列程序:

Private Sub form_Click( )

Dim sl As String, s2 As String

s1 = "1234"

m = 0

For i = 3 To 1 Step -1

m = m + 1

s2 = fun1(s1, m)

Debug.Print s2;

Next i

End Sub

Private Function fun1(x, y) As String

fun1 = Right(x, y)

End Function

单击窗体后,则在立即窗口内显示结果是( )。

A.1234

B.4321

C.434234

D.1111


相关考题:

下列程序的执行结果为Private Sub Command1_Click()Dim s1 As String, s2 As Strings1= "abcd"Call Transfer(s1, s2)Print s2End SubPrivate Sub Transfer (ByVal xstr As String, ystr As String)Dim tempstr As Stringi=Len(xstr)Do While i =1tempstr=tempstr + Mid(xstr, i, 1)i=i - 1Loopystr=te mpstrEnd Sub( )。A.dcbaB.abdcC.abcdD.dabc

单击窗体时,下列程序的执行结果是Private Sub Invert(ByVal xstr As String, ystr As String)Dim tempstr As StringDim I As IntegerI=Len(xstr)Do While I =1tempstr=tempstr + Mid(xstr, I, 1)I=I - 1Loopystr=tempstrEnd SubPrivate Sub Form_Click()Dim s1 As String, s2 As Strings1= "abcdef"Invert s1, s2Print s2End Sub( )。A.abcdefB.afbecdC.fedcbaD.defabc

有如下程序:Private Sub Form_Click()Dim i As Integer,Sum As IntegerSum=0For i=2 To 10If i Mod 2<>0 And i Mod 3=0 ThenSum=Sum+iEndIfNextPrint SumEnd Sub程序运行后,单击窗体,输出结果为A.12B.30C.24D.18

阅读下面的程序:Private Sub Form_Click()Dim Check As Boolean, Counter As IntegerCheck = TrueCounter = 5DoDo While Counter 20Counter = Counter + 1If Counter = 10 ThenCheck = FalseExit DoEnd IfLoopLoop Until Check = FalsePrint CounterEnd Sub程序运行后,单击窗体,输出结果为______。

设有如下程序:Private Sub Form_Click()Dim n As Integer, s As Integern = 8s = 0Dos = s + nn = n - 1Loop While n 0Print sEnd Sub以上程序的功能是______。程序运行后,单击窗体,输出结果为______。

下列程序,当单击窗体时s的值是( )Private Sub Form_Click()Dim s As Integers = Not 2 * 5<>11Print sEnd SubA. TrueB. FalseC.1D.0

设有如下程序:Private Sub Form_Click()Dim i As Integer,x As String,Y As Stringx=”ABCDEFG”For i=4 To 1 Step-1y=Mid(x,i,i)+yNext iPrint yEnd Sub程序运行后,单击窗体,输出结果为A.ABCCDEDEFGB.AABBCDEFGC.ABCDEFGD.AABBCCDDEEFFGG

下列程序运行时输出的结果是( )。 Option Base 1 Private Sub Form_Click() Const a=6 Dim x (a) As Integer For I=1 to a x(i)=1^2 Next I Print x(i) End SubA.36B.25C.1D.出错信息

在窗体上画一个命令按钮和两个文本框,其名称分别为Command1、Text1和Text2,然后编写如下程序: Dim S1 As String,S2 As String Private Sub Form_Load() Text1.Text="" Text2.Text="" End Sub Private Sub Text1_KeyDown(KeyCode As Integer,Shift As Integer) S2=S2 Chr(Keycode) End Sub Private Sub Text1_KeyPress(KeyAscii As Integer) S1=S1 Chr(KeyAscii) End Sub Private Sub Command1_Click() Text1.Text=S2 Text2.Text=S1 S1="" S2="" End Sub 程序运行后,在Text1中输入“abc”,然后单击命令按钮,在文本框Text1和Text2中显示的内容分别为______。A.abc和ABCB.abc和abeC.ABC和abcD.ABC和ABC

有弹出式菜单的结构如下表,程序运行时,单击窗体则弹出如下图所示的菜单。下面的事件过程中能正确实现这一功能的是( )。A.Private Sub Form_Click() PopupMenu cut End SubB.Private Sub Command1_Click() PopupMenu edit End SubC.Private Sub Form_Click() PopupMenu edit End SubD.Private Sub Form_Click() PopupMenu cut End Sub

有如下程序:Private Sub Form_Click()Dim i As Integer, sum As Integersum = 0For i = 2 To 10If i Mod 2 0 And i Mod 3 = 0 Thensum = sum + iEnd IfNext iPrint sumEnd Sub程序运行后,单击窗体,输出结果为( )。A.12B.30C.24D.18

有如下程序:Option Base 1Private Sub Form_Click()Dim arr,SumSum=0For i=1 To 10If arr(i)/3=arr(i)\3 ThenEnd IfNext iEnd Sub程序运行后,单击窗体,消息框的输出结果为( )。

下列程序运行后,单击窗体,输出结果为( )。 Private Sub Form_Click() Dim i As Integer, sum As Integer sum = 0 For i = 2 To 10 If i Mod 2 <> 0 Andi Mod 3 = 0 Then sum = sum + i End If Next i Print sum End Sub A. 12B. 18C. 24D. 30

设有如下程序: Private Sub Form. Click( ) Dim i As Integer,x As String,y As String x="ABCDEFG" For i=4 To 1Step-1 y=Mid(X,i,i)+y Next i Print y End Sub 程序运行后,单击窗体,输出结果为( )。A.ABCCDEDEFGB.AABBCDEFGC.ABCDEFGD.AABBCCDDEEFFGG

执行下面的程序,消息框里显示的结果是 【 】 。Private Sub Form_Click()Dim Str As String, K As IntegerStr="ab"For k=Len(Str) TO 1 Step-1Str=Str Chr(Asc(Mid(Str,k,1))+k)Next kMsgBox StrEnd Sub

在窗体中添加一个名称为Commandl的命令按钮,然后编写如下程序:Public X As Integer Private Sub Commandl Click( )x=10 Call slCall s2MsgBox x End Sub Private Sub sl( )x=x+20 End Sub Private Sub s2( )Dim x As Integer x=x+20End Sub窗体打开运行后,单击命令按钮,则消息框的输出结果为( )。A.10B.30C.40D.50

编写如下事件过程: Private sub sub1 (ByVal x1 As String, y1 As String) Dim xt As String Dim i As Integer i = Len(x1) Do While i>= 1 xt = xt + Mid(x1, i, 1) i=i-1 Loop y1 = xt End Sub Private Sub Form. Click() Dim s1 As String, s2 As String s1= "teacher" sub1 s1, s2 Print s2 End Sub 程序运行后,单击窗体,则窗体上显示的内容是A.rehcaetB.tahreeeC.themeeD.eerthea

执行下面的程序,消息框里显示的结果是( )。Private Sub Form_Click()Dim Str As String,S As String,k As IntegerS=StrFor k=Len(Str) To 1 Step -1S=S (Mid(Str,k,1)Next kEnd Sub

单击窗体时,下列程序的执行结果是 Private Sub Invert(By Val xstr As String,ystr As String) Dim tempstr AS String Dim I AS Integer I=Len(xstr) Do While I>=1 tempstr=tempstr + Mid(xstr,I,1) I=I - 1 Loop ystr=tempStr End Sub Private Sub Form_Click( ) Dim s1 As String,s2 As String S1="abcdef" Invert S1,S2 Print S2 End SubA.abcdefB.afbecdC.fedcbaD.defabc

在窗体中添加一个名称为Command1的命令按钮,然后编写如下程序: Public x As Integer Private Sub Command1_Click() x=10 Call s1 Call s2 MsgBox x End Sub Private Sub sl() x=x+20 End Sub Private Sub s2() Dim x As Integer x=x+20 End Sub 窗体打开运行后,单击命令按钮,则消息框的输出结果为( )。A.10B.30C.40D.50

下列程序的执行结果为 Private Sub Command1_C1ick( ) Dim sl As String,s2 AS String s1="abcdef" Call lnvert(s1,s2) Print s2 End Sub Private Sub lnvert(ByVal xstr As String,ystr As String) Dim tempstr As Stdng i=Len(xstr) Do While i>=1 tempstr=tempstr+Mid(xstr,i,1) i=i-1 Loop ystr=tempstr End SubA.fedcbaB.abcdefC.afbecdD.defabc

运行下列程序:Private Sub Form_Click( )Dim x As Integer, y As String, z As Stringy = 12345For x = 1 To Len(y)z = Mid(Left(y, x), 1)Next xPrint zEnd Sub单击窗体后,则在窗体上显示的结果是( )。A.1B.11111C.55555D.12345

运行下列程序:Private Sub Command1_Click( )Dim s1 As String * 1Dim s2 As Strings1 = aFor i = Asc(s1) To Asc(s1) + 4s2 = s2 Chr(i)Next iPrint s2End Sub单击Command1命令按钮后,则在窗体上显示的结果是( )。A.aB.abcdeC.aaaaD.s2

运行下列程序:Private Sub Form_Click( )Dim y As Integer, x As IntegerDo Until x > 20x 运行下列程序:Private Sub Form_Click( )Dim y As Integer, x As IntegerDo Until x 20x = x + 10y = y + xIf x 20 Then Exit DoLoopPrint x, yEnd Sub单击窗体后,则在窗体上显示的结果是( )。A.10 20B.30 60C.10 30D.20 60

设有如下程序: Private Sub Form. Click( ) Dim i As Integer,x As String,y As String x=ABCDEFGFor i=4 To 1Step-1y=Mid(X,i,i)+yNext iPrint yEnd Sub程序运行后,单击窗体,输出结果为( )。A.ABCCDEDEFGB.AABBCDEFGC.ABCDEFGD.AABBCCDDEEFFGG

下列程序的执行结果为 Private Sub Command1_Click() Dim s1 As String,s2 As String S1;="abcdef" Call Invert(s1,s2) Print s2 End Sub Private Sub Invert (ByVal xstr As String,ystr As String) Dim tempstr As String i=Len(xstr) Do While i=1 tempstr=tempstr+Mid(xstr,i,1) i=i-1 Loop ystr=tempstr End SubA.fedcbaB.abcdefC.afbecdD.defabc

下列程序的执行结果为 Private Sub Commandl_Click() Dim s1 As String ,s2 As String s1= "abcd" Call Transfer(sl,s2) Print s2 End Sub Private Sub Transfer (ByVal xstr As String,ystr As String) Dim tempstr As String ystr=tempstr End SubA.dcbaB.abdcC.abcdD.dabc