|
1. What is the main advantage
of adding a reference to an object library?
a)
The ability to reference objects of the object library
b)
The ability to user the set method.
c)
The ability to use early binding.
d)
The ability to use late binding.
2. Which advantage does early
binding have over late binding?
a)
Better execution speed
b)
Early bound objects can be passed to other objects, late bound
objects can not.
c)
Early bound objects can have events, late bound objects can not.
d)
Early binding provides syntax checking before encountering an
error at runtime, and late binding does not.
3. Form 1 has variable
declared as follows Public ICount as Integer. The application starts
with the Sub Main procedure and the first line executed is
Form1.iCount = 5
Which Form1 event or events will be triggered by this statement?
a)
Initialise only
b) Load only
c)
Initialise and load
d)
Activate and load
4. You are creating an
application that has a form with required data fields. You have
placed an "Ok" button on the form for the user to click
when they have finished entering data on the form. If the user has
failed to enter data in a required field, which statement should you
use to stop the form from unloading so that you can prompt the user
to enter the missing data?
a)
Cancel = True 選n QueryUnload
b)
Cancel = False 選n QueryUnload
c)
Cancel = True 選n Unload
d)
Cancel = False 選n Unload
5. Which three steps are
required in order to create a reference to an Excel Chart object
that is defined in a object library?
a)
Establish a reference to the type library using a DLL
b)
Assign an object reference to the variable by using the Implements
keyword
c)
Declare a variable of the object痴 class like:
Dim xlChart as createobject(Excel.Chart)
d)
Declare a variable of the object's class like:
Dim xlChart as createobject("Excel.Chart")
6. What is the purpose of the
Friend keyword?
a)
to make a procedure in a class available only within the class
which it is defined.
b)
to make a procedure in a class available to modules outside that
class, including modules in other applications.
c)
to make a procedure in a class available to modules outside that
class, but within the same application.
d)
to make a procedure in a class available to in-process components.
7. You are monitoring a global
variable and want to suspend program execution when its value
changes. Which debugging tool should you use?
a)
Watch window
b) Suspend
window
c)
Variables window
d)
Locals window and e) Immediate window
8. Examine the following
code:
Sub Test()
Static X
If X > 3 then
Exit Sub
Else X = X + 1
Call Test
End If
End Sub
What happens when the
Test procedure is called?
a)
A stack overflow error occurs
b)
It runs and completes execution without error
c)
A General Protection fault occurs
d)
It runs until you forcefully shutdown the application
9. You want to remember a
form's state so that when it is opened again, it will appear the
same. What function call would you use, and in which event procedure
would you place it?
a)
SaveRegSetting in the Form_Unload event
b)
SaveRegSetting in the Form_Deactivate event
c)
SaveSetting in the Form_QueryUnload even
d)
SaveSetting in the Form_Unload event
Score =
Correct answers:
|