VISUAL BASIC for APPLICATIONS TEST

Progress

1.

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

2.

Basic Excel Object model as follows:

3.

This control is used for titles/captions

4.

A single Case statement can contain multiple values

5.

Which of the following statements is not true about user-defined functions?

6.

Which part of VBA window, refers to area where code is written.

7.

Why Macro is used

8.

VBA Code run by

9.

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

10.

Which character in VBA, indicates start of a comment

11.

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

12.

A Combo box is loaded in the From_Initialize event with:

Combo1.AddItem “Red”

Combo1.AddItem “Blue”

Combo1.AddItem “Green”

13.

___________ indicates whether a particular condition is on or off

14.

32-bit Software/Applications can be installed on:

15.

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

16.

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

17.

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

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


 

18.

___________ statement enables us to trap runtime error.

19.

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

20.

What data type can hold any type of data?

21.

To force all variables is a VBA project to be declared, which must be stated in a module?

22.

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

23.

To close a form named Form1, you can use:

24.

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

25.

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

26.

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

27.

A loop that does not have the way of stopping is called a ___________

28.

The Properties window plays an important role in the development of Visual Basic Applications. It is mainly used

29.

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

30.

When the form is first referenced in any manner by program,the triggered event is….

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