Anda di halaman 1dari 2

SARVAJANIK COLLEGE OF ENGINEERING AND TECHNOLOGY

INFORMATION TECHNOLOGY DEPARTMENT


B.E. III I.C. (Semester-5)
SUBJECT: VISUAL BASIC APPLICATIONS AND PROGRAMMING
(INSTITUTE ELECTIVE-II)(150706)
MID TERM EXAM (AUGUST-2011)

Date: 30/08/2011

Q 1:

Time: 1:30 pm to 2:45 pm


Total Marks: 30

Select appropriate option.

1)

Which of the following tabs is required to use Macro in MS Office 2007


application?
a) References
b) Developer
c) Review
d) Mailing

2)

Name of the Macro cannot contain


a) Spaces
b) Punctuation characters
c) Special characters
d) All of above

3)

Which of the following is the property of IntelliSense tool in VBA?


a) Drag-and-Drop Text Editing
b) Require Variable Declaration
c) Auto List Members
d) Procedure Separator

4)

Which of the following loops executes the code once and repeats it when a
condition is false and until it becomes true?
a) Do While-Loop
b) Do Until-Loop
c) Do-Loop-While
d) Do-Loop-Until

5)

Which of the following options of Procedures allows the current procedure to be


accessible to other procedures in the same module?
a) Public
b) Private
c) Static
d) None of above

6)

How many types of message boxes are there in VB?


a) 5
b) 6
c) 7
d) 8

(10)

7)

What is tool tip text?


a) Tool tip text is a tip of the day
b) Tool tip text does not exist
c) Tool tip text is shown when the mouse is held over a object for a
period of time
d) Tool tip text is the same as the caption

8)

Which of these is not a valid MessageBox in VB?


a) vbOKonly
b) vbExitOnly
c) vbAbortRetryIgnore
d) vbRetryCancel

9)

What would the text in txtOutput read after the following code?
me.txtOutput.Text = 8+3*5
a) 55
b) 39
c) 23
d) 835

10)

Which control is the best choice when you want to get a yes/no answer from a
user?
a) Button
b) ListBox
c) CheckBox
d) ComboBox

Q 2:

Describe Object Browser. What is the difference between Step Into and Step Out
tools of code stepping in VBA?

(5)

Q 3:

Write the VBA code to create a macro that takes a number as input from the
user. Check if the number is less than or equal to 100 and greater than or equal
to 15. Print all the numbers between the input number and 11 using appropriate
loop. (for example, if input is 20, print 19 18 17 16 15 14 13 12)

(5)

Q 4:

1) What is the difference between a fixed array and dynamic array? Explain with
example
2) Explain Various Events of Form.

(3)

1) Write a program in VB to accept a number from the user and calculate its
square and square root.
2) How to add an item into the list box? Which methods are used to remove item
and to clear the list box?

(3)

Q 5:

**************************** End ***************************

(2)

(2)