Module 2 : Programming with VBA
1 Which VBA built in function returns location at the second string occurs within the first string?
A Mid()
B Chr()
C ASC()
D Instr()
2 Which keyword is used to declare the variables in project scope?
A Static
B Private
C Public
D Protect
3 In VBA, How many types of access specifiers available in VBA?
A 2
B 3
C 4
D 6
4 Which type of variable cannot be declared within a procedure in VBA?
A Project scope
B Local scope
C Global scope
D Module scope
5 Which variable recognized only within the procedure in which it is declared?
A Local scope
B Module scope
C Global scope
D Project scope
6 How many levels of variable scope available in VBA?
A 2
B 3
C 4
D 7
7 What will be the output of the following VBA code?
Debug.printformat(#1/1/2017#,”yyyy/mm/dd”)
A 1/1/2017
B Sun, Jan01, 2017
C 2017/01/01
D Sunday, January 01, 2017
8 Which function returns true if the expression is a valid date, otherwise it returns false in VBA?
A CDate()
B IsDate()
C Day()
D Dateadd()
9 What is the full form of UDF in VBA?
A User Data Functions
B User Defined Functions
C Undefined Functions
D Used Data Functions
10 Which function returns the day of the month (number from 1 to 31) given date value in VBA?
A Day()
B Date()
C Month()
D Date part()
11 Which function returns the current system date and time in VBA?
A Date()
B Day()
C Hour()
D Now()
12 Which function extracts the first 5 characters from a string in VBA?
A Right(str,5)
B Left(str,5)
C Mid(str,5)
D Substr(str,5)
13 Which color of dot indicate the breakpoint in VBA?
A Grey
B Yellow
C Maroon
D Red
14 Which shortcut key is used to set the properties of form while designing?
A F4
B Ctrl + F4
C Alt + F4
D Shift + F4
15 Which shortcut key is used to open code window in VBA?
A F7
B Alt + F7
C Ctrl + F7
D Shift + F7
16 Which code is used to display a user form in VBA?
A Load user Form1
B User Form1.Show
C User Form1.Show False
D User Form1.Load
17 Which mathematical function returns square root of a specified number in VBA?
A Sqt()
B Squr()
C Sqrt()
D Sqr()
18 Which VBA function is used to convert the string from uppercase to lowercase?
A Lcase()
B Lower()
C Ucase()
D Upper()
19 Which of the following is logical operator in VBA?
A +
B –
C *
D And
20 Which character is to be suffixed for long data type in VBA?
A &
B !
C #
D @
21 What is the storage size of decimal data type in VBA?
A 2 bytes
B 4 bytes
C 8 bytes
D 12 bytes
22 What is the storage size of currency data type in VBA?
A 2 bytes
B 4 bytes
C 8 bytes
D 12 bytes
23 How many numeric data types available in Excel VBA?
A 4
B 5
C 7
D 8
24 What is the another name for keywords in VBA?
A Literals
B Variables
C User defined words
D Reserved words
25 Which key word is used to declare the variable in VBA?
A Sub
B Declare
C Dim
D AS
26 Which data type can hold any type of values in VBA?
A Variant
B Variable
C Constant
D Keyword
27 Which entitie hold data in VBA?
A Literals
B Constants
C Keywords
D Variables
28 Which worksheet method is used to copy a sheet to another location in the workbook?
A Activate
B Copy
C Save AS
D Select
29 Which VBA worksheet property return or sets a string value that represents the object name?
A Name
B Index
C Range
D Cells
30 Which method displays the data form associated with the worksheet in VBA?
A Copy
B Printout
C Show Data Form
D Select
31 Which VBA property returns a range object that represents all the cells on the worksheet?
A Cells
B Rows
C Index
D Name
32 Which object is member of the workbook?
A Sheets
B Workbook
C Worksheet
D Range
33 Which type of work book method cannot be modified in VBA?
A Close
B Save
C Save AS
D Protect
34 Which workbook property returns a string value that represents the name of the object in VBA?
A Full name
B Name
C Path
D Worksheets
35 Which workbook property returns the name of the object including its path on disk in VBA?
A Full name
B Name
C Path
D Worksheets
36 Which can hold lot of data with one variable in VBA?
A Arrays
B Collections
C Groups
D Methods
37 Which type of list box enables one choice of adjacent choice in VBA?
A Drop down list
B Single – selection list box
C Multiple – selection list box
D Extended – selection list box
38 Which button has three states in VBA?
A Option button
B Spin button
C Push button
D Command button
39 Which box groups related controls into one visual unit in a rectangle with an optional label?
A Label box
B Group box
C List box
D Combo box
40 Which is used to create user interface forms?
A C
B VBA
C HTML
D Javascript
41 Where does Excel come in object hierarchy of VBA?
A Range object
B Workbook object
C Worksheet object
D Application object
42 Which shortcut key is used to open project explorer window in VBA?
A Ctrl + R
B Ctrl + P
C Ctrl + W
D Ctrl + E
43 Which shortcut key is used to open VBA Editor from the Excel worksheet?
A Ctrl + F11
B Alt + F11
C Ctrl + V
D Ctrl + F7
44 What is the Full form of IDE?
A Integrated Development Element
B Internal Development Environment
C Integrated Development Environment
D Internal Distributed Environment
45 Which shortcut key is used to step into line – by – line execution in VBA?
A F2
B F4
C F5
D F8
46 What is called the set of commands bundled together under one name?
A Properties
B Macros
C Procedures
D Events
47 What is called the set of statement that are executed under one name?
A Macros
B Properties
C Procedures
D Events
48 Which one is attributes of an object in VBA?
A Procedures
B Events
C Macros
D Properties
49 What is called double clicking an object in VBA?
A Events
B Macros
C Procedures
D Methods
50 Which is used to type / edit the programming code in VBA?
A Form window
B Properties window
C Immediate window
D Visual basic editor
51 What is the alternate name of Bugs?
A Errors
B Keywords
C Variables
D Constants
52 Which shortcut key is used to open the Visual Basic Editor In VBA?
A Alt + F11
B Ctrl + F11
C Shift + F11
D Shift + Ctrl + F11
1 Which simplifies the work to be eliminating or rewriting the code in VBA?
A Class
B Object
C Macros
D Functions
2 Which type of variable can be accessed or used by subroutines outside the modules in VBA?
A Static
B Private
C Protect
D Public
3 Where there is no difference between dim and private in VBA?
A Local scope
B Module scope
C Global scope
D Project scope
4 Which method is used to pass the reference to the arguments?
A Ref
B Val
C Reference
D By Ref
5 Which function is used to check whether the given input is numeric or Not in VBA?
A Numeric()
B Isnumber()
C Isnumeric()
D Isnum()
6 Which function returns specified part of a given date in VBA?
A Day()
B Datevalue()
C Datediff()
D Datepart()
7 Which function returns the difference between two date values based on the interval specified in VBA?
A Datediff()
B Day()
C Daydiff()
D Datedif()
8 What is the return type of CSng function in VBA?
A Boolean
B Variant
C Single
D String
9 Which VBA code is used to load user form into memory but do not display?
A User form1.Show
B Load userform1
C Userform1.load
D Show userform1
10 Which VBA code is used to remove the user form from memory?
A Unload me
B Userform1.hide
C Unload userform1
D User form show false
11 Which window displays the watched expression including the one just added?
A Module window
B Immediate window
C Watch window
D Debug window
12 Which one is indicated by a red dot with a line of code highlighted in red in VBA?
A Break point
B Start point
C End point
D Error point
13 Which is used to repeats the same steps in case of frequency needed actions in VBA?
A Class
B Object
C Functions
D Macros
14 Which function returns the integer portion of a number in VBA?
A Int()
B Format()
C Abs()
D Sign()
15 Which function returns the hyperbolic cosine of the specified angle in VBA?
A Abs()
B Cos()
C Cosh()
D hcos()
16 Which mathematical function generates a random number in VBA?
A Random()
B Rnd()
C Rand()
D Round()
17 Which operators are concatenation operator in VBA?
A + and –
B & and –
C & and +
D & and *
18 Which type of words cannot use for any other purpose in VBA?
A Literals
B Keywords
C Constants
D Variables
19 Which is a series of items where all items share the same properties and methods in VBA?
A Arrays
B Groups
C Methods
D Collections
20 Which button allows a single choice within a limited set of mutually exclusive choice?
A Button
B Option button
C Spin button
D Toggle button
21 Which box has three states in VBA?
A List box
B Combo box
C Check box
D Group box
22 Which one creates a box with a scrollable list containing a number of input values in VBA?
A Combo box
B Option button
C Text box
D List box
23 Which control is suitable to collect the input from the user in VBA?
A Label
B Text box
C Command button
D User form
24 Which is a proper object hierarchy in VBA?
A Worksheet, Workbook, Application, Range
B Range, Application, Worksheet, Workbook
C Range, Worksheet, Workbook, Application
D Application, Workbook, Worksheet, Range
25 What is the shortcut key to run the current procedure in VBA?
A F2
B F4
C F5
D F8
26 Which window displays the entire list of local varibles and their current values in VBA?
A Locals window
B Watch window
C Immediate window
D Debugging window
27 Which window is similar to the locals window, but it is used to tracing the variables in VBA?
A Call stack window
B Watch window
C Immediate window
D Debugging window
28 Which shortcut key is used to open the immediate window?
A Ctrl + G
B Ctrl + L
C Alt + G
D Alt + L
29 What is the another name trigger for an action in VBA?
A Methods
B Modules
C Events
D Macros
30 Which shortcut key allows debugger to run the current procedure and go line after line called the procedure in VBA?
A Ctrl + Shift + F6
B Ctrl + Shift + F7
C Ctrl + Shift + F8
D Ctrl + Shift + F9
31 While debugging code, which statement allows to go to the highlighted line?
A Step into
B Step over
C Step out
D Show next
32 Which control is used to increase or decrease a value, such as a number time or date?
A Scroll Bar
B Spin Button
C Combo Box
D Toggle Button
1 Which VBA function compares given strings and returns -1 if the first string is smaller than the second string, returns 0 if both are equal and 1 if the first string is greater than second string?
A Strcmp
B Strcomp
C Compare
D Scmp
2 Which scope does the variable declared with dim and remains in the existance only as long as the procedure in which if is declared is running?
A Global scope
B Local scope
C Module scope
D Project scope
Respected sir/mam,
Please provide Trade- CSA of CITS practice test
Hello dear 👋👋