You are on page 1of 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 REMEDIAL EXAM (AUGUST-2011)
Date: 08/09/2011

Q 1:

Time: 4:00 pm to 5:15 pm


Total Marks: 30

Select appropriate option.

1)

Macros cannot be used with DLLs. True or False?

2)

Extension of VB project is
a) .vba
b) .vbp
c) .vb
d) .vbf

3)

What is the shortcut key to execute Step-Into option?


a) F1
b) F3
c) F5
d) F8

4)

____________ statement allows the control flow to jump over a labeled code
location somewhere else in a program.
a) Label
b) GoTo
c) Switch
d) If-Else

5)

_____________ loop executes the code if the condition is true and continues to
perform it until the condition becomes false.
a) Do While-Loop
b) Do-Loop While
c) Do-Until Loop
d) For-Next Loop

6)

Why would you use a message box?


a)
b)
c)
d)

To display a short message to a user


All of these options
To get an answer from a user for a simple question
To alert a user to an error

(10)

7)

If I wanted to multiply the value that the user has typed into txtInput by 5 and
store the value in lblOutput, I would type
a) Me.lblOutput.Text = txtInput.Text * 5
b) txtInput * 5 = lbloutput
c) me.lblOutput.Text = txtInput.Text times 5
d) lblOutput.value = txtInput.value * 5

8)

A programmer creates a form that has two text boxes, txtFoo and txtBar. The
programmer types the following code in: Me. lblAnswer.text = me.txtFoo.Text +
me.txtBar.Text If the user types the number 5 into txtFoo and the number 12
into txtBar, what is put into lblAnswer?
a) 512
b) 60
c) 17
d) 125

9)

VB stands for
a) Visual Building
b) Visual Basic
c) View Building
d) View Basic

10)

When creating a message box, to have it display Abort, Retry and Ignore
buttons, you would type:
a) msgbox(message,Abort,Retry,Ignore)
b) msgbox(message)
c) msgbox(message, AbortRetryIgnore)
d) msgbox(MsgBoxStyle.AbortRetryIgnore)

Q 2:

Explain For-Each Next loop with example.

Q 3:

Write a VBA code to enter a password from the user. If the user enters a (5)
password other than SCET, loop continues to prompt for the correct password.

Q 4:

Q 5:

(a) Explain Input box and Message box.


(b) What is a lifetime of Variable?

(5)

(3)
(2)

Write a Program in VB to accept two numbers in the Textbox and add them (5)
without using Val and with using Val.

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

You might also like