1 Sample
Code
Text1.Zorder
What does the sample code above do?
Choice 1
Moves Text1 to the form with focus.
Choice 2
Moves Text1 to the upper left corner of the form.
Choice 3
Moves Text1 to the lower right corner of the form.
Choice 4
Moves Text1 to the back.
Choice 5
Moves Text1 to the front.
answer--5
---------------
2 String
Declaration
Dim s As String * 100
What is the purpose of the "* 100" in the declaration above?
Choice 1
Defines s as a fixed size string 100 characters long.
Choice 2
Tells VB to expand s by 100 characters at a time instead of the default one
character at a time.
Choice 3
Defines s as an array of 100 strings.
Choice 4
Sets an upper limit on the growth of s at 100 characters.
Choice 5
Initializes the first 100 characters of s to "*" characters.
answer--1
-----------
3 Timer
Timer1.Interval = 50000
How long, in seconds, before the Timer1.Timer event shown above is fired?
Choice 1
1/2 second
Choice 2
5 seconds
Choice 3
50 seconds
Choice 4
500 seconds
Choice 5
5,000 seconds
answer--3
----------
4
What Recordset method can be used to make a duplicate Recordset to allow you
to have multiple current records?
Choice 1
Set rs2 = rs1.Duplicate()
Choice 2
Set rs2 = rs1.Copy()
Choice 3
Set rs2 = rs1.Clone()
Choice 4
Set rs2 = rs1.Snapshot()
Choice 5
No special method exists or is required. Just use: Set rs2 = AddressOf rs1
----------------
5
You have created a property in your class. Which of the following should be used
to return the value of the property?
Choice 1
Property Write
Choice 2
Property Read
Choice 3
Property Let
Choice 4
Property Get
Choice 5
Property Set
answer--4
-----------------
6 Sample
Code
Dim i As Long
Dim X As Long, Y As Long, Z As Long
For i = 1 To 10
Select Case i
Case 1 To 5
X = X + 1
Case 2
Y = Y + 1
Case Is > 3
Z = Z + 1
End Select
Next i
When the sample code finishes, what will the values of X, Y and Z be?
Choice 1
the code will not compile
Choice 2
x=1, y=1, z=5
Choice 3
x=5, y=1, z=7
Choice 4
x=5, y=0, z=7
Choice 5
x=5, y=0, z=5
answer--5
---------------
7
Sample
Code
Dim Wstr as String * 7
Wstr = "Hello World"
MsgBox Wstr
What happens when you run the sample code above?
Choice 1
A message box says "o World".
Choice 2
An error message states that value is too large for the receiving field.
Choice 3
A message box says "Hello W".
Choice 4
A message box says "Wstr".
Choice 5
A message box says "Hello World".
answer--3
----------
8 Sample
Code
Select Case X
Case 1, 3, 5
Msgbox "Odd"
Case 2, 4, 6
Msgbox "Even"
Case > 6
Msgbox "Large"
End Select
In the sample code above, what happens when X = 0?
Choice 1
Message Box "Large"
Choice 2
Message Box "Other"
Choice 3
Message Box "Even"
Choice 4
No message boxes are displayed.
Choice 5
Message Box "Odd"
answer--4
-----------
9 Sample
Code
Dim X as Integer
Dim Y as Integer
Y = 1
X = Instr(Y,"Hello World","e")
In the sample code above, what is the value of X?
Choice 1
0
Choice 2
1
Choice 3
2
Choice 4
3
Choice ---1