VISUAL BASIC for APPLICATIONS TEST

Progress

1.

Do…Loop... Until code block is always executed once.

2.

What property of controls tells the order they receive the focus when the tab key is pressed during run time? it.

3.

Which character in VBA, indicates start of a comment

4.

Which of the following arithmetic operations has the highest level of precedence?

5.

The _______________ control used to insert image to the form

6.

_______________ is the function to compare 2 strings.

7.

This control is used for titles/captions

8.

You have declared 4 variables

 Which of these variable declarations is not a valid VBA statement?

9.

Which event, runs macros automatically in excel VBA while opening Workbook

10.

What will be the output of the following code?

Sub LoopExample()

Dim StartNumber As Integer

Dim EndNumber As Integer

Dim Answer As Integer

Answer = 5

EndNumber = 5

For StartNumber = 1 To EndNumber

Answer = Answer + EndNumber

Next StartNumber

MsgBox Answer

      End Sub

11.

The value returned by InputBox is a string

12.

Which windows displays a list of all forms and modules making up your application.

13.

__________ are the attributes of an object that control the object's appearance and behavior.

14.

An object is composed of :

15.

What will the value of ThisVar be after the following lines of code execute? 

Dim ThisVar As String 
Dim MyName = "John" 
ThisVar = MyName & "John"


 

16.

___________ indicates whether a particular condition is on or off

17.

This operator reverses the truth value of an expression; making a true expression false and a false expression true.

18.

What do you need to select to set the developer mode?

19.

What is the color of comments?

20.

To break up long lines of code, the line continuation character in VBA is

21.

Suppose the variable myName is declared in a Dim statement in two different Sub procedures. Which statement is true?

22.

Private Procedure can be called from anywhere in the project

23.

Given the following section of code, if a programmer called the GetAge() subroutine, what value would the message box display? 

Private Sub GetAge()

Dim UserAge As String

UserAge = 10

UserAge = InputBox("Enter your age", "Get Age")

Call ShowAge

End Sub

Private Sub ShowAge()

Dim UserAge As Integer

UserAge = 0

MsgBox (UserAge)

End Sub

24.

___________ control is used to provide an identifiable grouping for other controls

25.

There can be different data types of an element in an array

26.

When the block of code finishes the execution, what will the final value of X be?

Public Sub Example ()

Dim Y As Integer

Dim X As Integer

X = 0

Y = 10

For Count = Y To 1 Step -2

X = X + Y

If Y = (Y = 1) Then

Exit For

End If

Next Count

X = X / X

MsgBox X

End Sub

27.

___________ statement enables us to trap runtime error.

28.

Given that x = 7, y = 2, and z = 4, the following If block will display “TRUE”. If (x > y) Or (y > z) Then txtBox.Text = “TRUE” End If

29.

A ______________ returns a value to the part of the program that called it.

30.

Which Case clause will be true whenever the value of the selector in a Select Case block is between 1 and 5 or is 8?

Assessment complete! Thank you for you time.
We are redirecting you to the result page, Please click on 'SUBMIT'