SlideShare a Scribd company logo
VBA
1. The programming environment which permits coding, compilation, running and debugging from
a single window is called
.(a) Integrated Development Environment (IDE)
(b) Editor
(c) Highlighter
(d) Compiler
Ans. a
2. The IDE of VBA supports since it permits drag and drop approach for design of user interface.
(a) Procedural Approach
(b) reverse approach
(c) Rapid Application Development (RAD)
(d) postfix approach
Ans. c
3. VBA permits of data from spreadsheets.
(a) reading
(b) writing
(c) both reading and writing
(d) neither reading nor writing
Ans. c
4. VBA supports ready made user interface components like .
(a) UserForm, CommandButton
(b) Label, TextBox, ComboBox, ListBox
(c) TabStrip, OptionButton, ToggleButton
(d) all of them
Ans. d
5. VBA supports through class module.
(a) Object Oriented Programming System (OOPS)
(b) Procedural programming
(c) Functional programming
(d) property based model
Ans. a
6. VBA can be used to automate carried out through MS Excel.
(a) data processing
(b) graphing
(c) accessing cell values
(d) all of them
Ans. d
7. VBA code is compiled into an intermediate code called code.
(a) P-Code
(b) MicroSoft Intermediate Code (MSIL)
(c) Java Virtual Machine (JVM) code
(d) Android Virtual Device (AVD) code
Ans. a
8. MS Excel creates to execute VBA code.
(a) real time computer
(b) mobile computer
(c) tablet computer
(d) virual machine
Ans. d
9. ____is the shortcut to open VBA IDE from MS Excel.
(a) Alt+F11 (b) Alt+F8 (c) Ctrl+Break (d) Ctrl+G
Ans. a
10._______ is the shortcut to open immediate window in VBA IDE.
(a) Alt+F11 (b) Alt+F8 (c) Ctrl+Break (d) Ctrl+G
Ans. d
11. _______is the shortcut to open list of macros.
(a) Alt+F11 (b) Alt+F8 (c) Ctrl+Break (d) Ctrl+G
Ans. b
12. is the shortcut to stop execution of programs in VBA IDE.
(a) Alt+F11 (b) Alt+F8 (c) Ctrl+Break (d) Ctrl+G
Ans. c
13. ______ is the shortcut to display information relating to selected component in VBA IDE.
(a) Ctrl+I (b) Ctrl+J (c) Ctrl+R (d) Ctrl+Shift+I
Ans. a
14. ______is the shortcut to properties and methods of a component in VBA IDE.
(a) Ctrl+I (b) Ctrl+J (c) Ctrl+R (d) Ctrl+Shift+I
Ans. b
15._______ is the shortcut to display project explorer in VBA IDE.
(a) Ctrl+I (b) Ctrl+J (c) Ctrl+R (d) Ctrl+Shift+I
Ans. c
16. ______is the shortcut to display parameter information for selected element in VBA IDE.
(a) Ctrl+I (b) Ctrl+J (c) Ctrl+R (d) Ctrl+Shift+I
Ans. d
17. _______is the shortcut to add breakpoint in VBA IDE.
(a) F9 (b) F5 (c) F1 (d) F2
Ans. a
18. ______is the shortcut to display object browser in VBA IDE.
(a) F9 (b) F5
(c) F1 (d) F2
Ans. d
19. _______is the shortcut to display properties window in VBA IDE.
(a) F4 (b) F5
(c) F1 (d) F2
Ans. a
20.__________structure is useful for decision involving three or more options.
a) Switch b) Select case c) Function d) List
Ans. b
21. VBA has a coding, compilation, running and debugging environment called
(a) Integrated Development Environment (IDE)
(b) Editor
(c) Highlighter
(d) Compiler
Ans. a
22. In VBA, the function Asc converts given character value to numeric code in______ system.
(a) American Standard Code for Information Interchange (ASCII)
(b) Double Byte Character Set (DBCS)
(c) Unicode
(d) none of them
Ans. a
23. In VBA, the function AscB converts given character value to numeric code in ______system.
(a) American Standard Code for Information Interchange (ASCII)
(b) Double Byte Character Set (DBCS)
(c) Unicode
(d) none of them
Ans. b
24. In VBA, the function AscW converts given character value to numeric code in
________system.
(a) American Standard Code for Information Interchange (ASCII)
(b) Double Byte Character Set (DBCS)
(c) Unicode
(d) none of them
Ans. c
25. In VBA, the function Chr converts given numeric value to character value in _______system.
(a) American Standard Code for Information Interchange (ASCII)
(b) Double Byte Character Set (DBCS)
(c) Unicode
(d) none of them
Ans. a
26. In VBA, the function ChrB converts given numeric value to character value in ______system.
(a) American Standard Code for Information Interchange (ASCII)
(b) Double Byte Character Set (DBCS)
(c) Unicode
(d) none of them
Ans. b
27. In VBA, the function ChrW converts given numeric value to character value in _______system.
(a) American Standard Code for Information Interchange (ASCII)
(b) Double Byte Character Set (DBCS)
(c) Unicode System
(d) none of them
Ans. c
28. In VBA, Cstr function converts any data to_____ type.
(a) Integer (b) Double (c) Single (d) String
Ans. d
29. CDbl function converts String to _________type.
(a) Integer (b) Double (c) Single (d) String
Ans. b
30. In VBA, CInt function converts String to _______type.
(a) Integer (b) Double (c) Single (d) String
Ans. a
31. In VBA, Csng function converts String to _______type.
(a) Integer (b) Double (c) Single (d) String
Ans. c
32. In VBA, Val function converts String to _______type.
(a) number (b) byte (c) Currency (d) Decimal
Ans. a
33. In VBA, CByte function converts String to ______type.
(a) number (b) byte (c) Currency (d) Decimal
Ans. b
34. In VBA, CCur function converts String to _______type.
(a) number (b) byte (c) Currency (d) Decimal
Ans. c
35. In VBA, CLng function converts String to_______ type.
(a) Long (b) byte (c) Currency (d) Decimal
Ans. a
36. In VBA, CDec function converts String to_______ type.
(a) number (b) byte (c) Currency (d) Decimal
Ans. d
37. ______function in VBA creates a custom error message.
(a) Format (b) CVErr (c) InputBox (d) MsgBox
Ans. b
38. ________function in VBA formats a number according to given text strings containing 0, # and
comma (,).
(a) Format (b) CVErr (c) InputBox (d) MsgBox
Ans. a
39. Boolean data type in VBA has size of ______
(a) 1 byte (b) 2 bytes (c) 3 bytes (d) 4 bytes
Ans. b
40. Byte data type in VBA has size of________
(a) 1 byte (b) 2 bytes (c) 3 bytes (d) 4 bytes
Ans. a
41. Byte in VBA can store values in the range of________ .
(a) 0 to 255
(b) -922,337,203,685,477.5808 to +- 922,337,203,685,477.5807
(c) 01-Jan-100 to 31-Dec-9999
(d) _79; 228; 162; 514; 264; 337; 593; 543; 950; 335or _7:9228162514264337593543950335
Ans. a
42. Currency data type in VBA has size of_________
(a) 2 bytes (b) 3 bytes (c) 4 bytes (d) 8 bytes
Ans. d
43. Currency data type in VBA can store valuesin the range of ________
(a) 0 to 255
(b) -922,337,203,685,477.5808 to +-922,337,203,685,477.5807
(c) 01-Jan-100 to 31-Dec-9999
(d) _79; 228; 162; 514; 264; 337; 593; 543; 950; 335or _7:9228162514264337593543950335
Ans. b
44. Date data type in VBA has size of________
(a) 2 bytes (b) 3 bytes (c) 4 bytes (d) 8 bytes
Ans. d
45. Date data type in VBA can store valuesin the range of ________.
(a) 0 to 255
(b) -922,337,203,685,477.5808 to +-922,337,203,685,477.5807
(c) 01-Jan-100 to 31-Dec-9999
(d) _79; 228; 162; 514; 264; 337; 593; 543; 950; 335or _7:9228162514264337593543950335
Ans. c
46. Decimal data type in VBA has size of________
(a) 14 bytes (b) 8 bytes (c) 4 bytes (d) 2 bytes
Ans. a
47. Decimal data type in VBA can store valuesin the range of_________ .
(a) 0 to 255
(b) -922,337,203,685,477.5808 to +-922,337,203,685,477.5807
(c) 01-Jan-100 to 31-Dec-9999
(d) _79; 228; 162; 514; 264; 337; 593; 543; 950; 335or _7:9228162514264337593543950335
Ans. d
48. Double data type in VBA has size of_______
(a) 14 bytes (b) 8 bytes
(c) 4 bytes (d) 2 bytes
Ans. b
49. Double data type in VBA can store valuesin the range of_________ .
(a) _1:79769313486232E308 to_4:94065645841247E324
(b) -32,768 to +32,767
(c) -2,147,483,648 to +2,147,483,647
(d) _3:402823E38 to _1:401298E45
Ans. a
50. Integer data type in VBA has size of_________
(a) 14 bytes (b) 8 bytes (c) 4 bytes (d) 2 bytes
Ans. d
51. Integer data type in VBA can store valuesin the range of _______.
(a) _1:79769313486232E308 to_4:94065645841247E324
(b) -32,768 to +32,767
(c) -2,147,483,648 to +2,147,483,647
(d) _3:402823E38 to _1:401298E45
Ans. b
52. Long data type in VBA has size of_______.
(a) 14 bytes (b) 8 bytes (c) 4 bytes (d) 2 bytes
Ans. c
53. Long data type in VBA can store valuesin the range of________ .
(a) _1:79769313486232E308 to_4:94065645841247E324
(b) -32,768 to +32,767
(c) -2,147,483,648 to +2,147,483,647
(d) _3:402823E38 to _1:401298E45
Ans. c
54. Single data type in VBA has size of_______.
(a) 14 bytes (b) 8 bytes
(c) 4 bytes (d) 2 bytes
Ans. c
55. Single data type in VBA can store valuesin the range of_______ .
(a) _1:79769313486232E308 to_4:94065645841247E324
(b) -32,768 to +32,767
(c) -2,147,483,648 to +2,147,483,647
(d) _3:402823E38 to _1:401298E45
Ans. d
56. Object data type in VBA has size of_______.
(a) 14 bytes (b) 8 bytes
(c) 4 bytes (d) 2 bytes
Ans. c
57. String data type in VBA has size of________.
(a) 14 bytes
(b) 10+length of string bytes
(c) 4 bytes
(d) 2 bytes
Ans. b
58. String data type in VBA can store a maximumof _________characters.
(a) 65,400
(b) 32,767
(c) 2,147,483,648
(d) 100
Ans. a
59. Variant data type in VBA has size of_______
(a) 14 bytes
(b) 10+length of string bytes
(c) 16 or 22+length in bytes
(d) 2 bytes
Ans. c
60. Variant data type can store_________ .
(a) String larger than 65,400 characters in length
(b) number larger than Double
(c) both a & b
(d) none of them
Ans. c
61. The_______ arithmetic operator in VBA takes the highest precedence.
(a) % (b) + (c) - (d) ^
Ans. d
62. The______ arithmetic operator in VBA calculates power of a number.
(a) % (b) + (c) - (d) ^
Ans. d
63. The______ arithmetic operator in VBA has precedence after the ^ operator.
(a) % (b) + (c) - (d) /
Ans. a
64. The ______arithmetic operator in VBA has precedence after the % operator.
(a) * (b) + (c) - (d) /
Ans. d
65. The ______arithmetic operator in VBA has precedence after the / operator.
(a) * (b) + (c) - (d) none of them
Ans. a
66. In the following expression, find out the first operation: 3 * 2 + 5 / 2 + 3 % 2 * 2 ^ 4
(a) 3 * 2
(b) 2 ^ 4
(c) 5 / 2
(d) 3 % 2
Ans. b
67. ______operator in VBA returns true if the left and sides are equal.
(a) = (b) <> (c) < (d) >
Ans. a
68. _____operator in VBA returns true if the left and sides are not equal.
(a) = (b) <> (c) < (d) >
Ans. b
69. ______operator in VBA returns true if the left side is less than the right side.
(a) = (b) <> (c) < (d) >
Ans. c
70. ______operator in VBA returns true if the left side is greater than the right side.
(a) = (b) <> (c) < (d) >
Ans. d
71. ______operator in VBA returns true if the left side is less than or equal the right side.
(a) <= (b) >= (c) < (d) >
Ans. a
72. ______operator in VBA returns true if the left side is greater than or equal to the right side.
(a) <= (b) >= (c) < (d) >
Ans. b
73. What would be the result of the following comparison?:5 < 3
(a) true
(b) false
(c) neither true nor false
(d) both true and false
Ans. b
74. What would be the result of the following comparison?:5 > 3
(a) true
(b) false
(c) neither true nor false
(d) both true and false
Ans. a
75. What would be the result of the following comparison?:5 = 3
(a) true
(b) false
(c) neither true nor false
(d) both true and false
Ans. b
76. What would be the result of the following comparison?:5 <= 3
(a) true
(b) false
(c) neither true nor false
(d) both true and false
Ans. b
77. What would be the result of the following comparison?:5 >= 3
(a) true
(b) false
(c) neither true nor false
(d) both true and false
Ans. a
78. What would be the result of the following comparison?:5 = 3
(a) true
(b) false
(c) neither true nor false
(d) both true and false
Ans. b
79. _____and_____are the two concatenation operators available in VBA.
(a) + and & (b) @ and %m (c) * and ! (d) # and $
Ans. a
80. In VBA, using__________ operatorfor concatenation results in addition if Strings have numeric
value and concatenationif Strings have alphanumeric value.
(a) & (b) $ (c) # (d) +
Ans. d
81. In VBA, using _______operator forconcatenation results concatenation of Strings, irrespective
of numeric or alphanumericvalue stored in the Strings.
(a) & (b) $ (c) # (d) +
Ans. a
82. The ____operator in VBA returns true if only one of the 2 comparisons is true.
(a) OR (b) AND (c) NOT (d) XOR
Ans. d
83. Choose the result of the following VBAexpression:x = "20" & "32"
(a) 2032 (b) 52 (c) 3220 (d) ""
Ans. a
84. Choose the result of the following VBAexpression:x = "Hi, " + "how are you?"
(a) "how are you, Hi?" (b) "Hi: how are you"
(c) "Hi, how are you?" (d) "Hi?"
Ans. c
85. Choose the result of the following VBAexpression: x = "Hi, " & "how are you?"
(a) "how are you, Hi?" (b) "Hi: how are you"
(c) "Hi, how are you?" (d) "Hi?"
Ans. c
86. The operators in VBA which combine the results of several comparisons are
called__operators.
(a) logical (b) arithmetical (c) mathematical (d) concatenation
Ans. a
87. The _____operator in VBA returns true only if both sides of the operator are true.
(a) OR (b) AND (c) NOT (d) XOR
Ans. b
88. The______ operator in VBA returns true only if given comparison is false.
(a) OR (b) AND (c) NOT (d) XOR
Ans. c
89. The expression in VBA (5<3) XOR (4>2) results in_____ .
(a) true (b) false (c) neither true nor false (d) both true and false
Ans. a
90. The expression in VBA (5>3) XOR (4>2) results in______ .
(a) true (b) false (c) neither true nor false (d) both true and false
Ans. b
91. The expression in VBA NOT (4>2) results in ______.
(a) true (b) false (c) neither true nor false (d) both true and false
Ans. b
92. The expression in VBA NOT (4<2) results in______ .
(a) true (b) false (c) neither true nor false (d) both true and false
Ans. a
93. _______operators in VBA compare the corresponding bits of numbers to arrive a result.
(a) logical (b) arithmetical (c) mathematical (d) bitwise
Ans. d
94. The _________ operator in VBA returns 1 only if both bits are 1.
(a) OR (b) AND (c) NOT (d) XOR
Ans. b
95. The ________operator returns 1 if given bit is 0 and returns 0 if given bit is 1.
(a) OR (b) AND (c) NOT (d) XOR
Ans. c
96. The ________ operator returns 1 if at least one of the bits is 1.
(a) OR (b) AND (c) NOT (d) XOR
Ans. a
97. The ________operator returns 1 if only one of the two bits is 1 and the other one is 0.
(a) OR (b) AND (c) NOT (d) XOR
Ans. d
98. The expression in VBA 5 AND 3 (101 AND 11) results in______ .
(a) 1 (b) 3 (c) 5 (d) 7
Ans. a
99. The expression in VBA 5 XOR 3 (101 XOR 011) results in _______ .
(a) 1 (b) 3 (c) 6 (d) 7
Ans. c
100. _____function in VBA returns positive value of a number, irrespective of whether the input is
positive or negative.
(a) ABS (b) ATN (c) COS (d) EXP
Ans. a
101. ______function in VBA returns the cosine value of given number.
(a) ABS (b) ATN (c) COS (d) EXP
Ans. c
102. _______function in VBA returns exponential value of given input.
(a) ABS (b) ATN (c) COS (d) EXP
Ans. d
103. ______function in VBA returns integer part of given input.
(a) FIX (b) FORMAT (c) INT (d) LOG
Ans. a
104.______ function in VBA returns integer portion of given input.
(a) FIX (b) FORMAT (c) INT (d) LOG
Ans. c
105. _______function in VBA returns logarithm of given number to specified base.
(a) FIX (b) FORMAT (c) INT (d) LOG
Ans. d
106. ______ function in VBA returns formatted version of given number (the format being specified
by 0 and #).
(a) FIX (b) FORMAT (c) INT (d) LOG
Ans. b
107._______function in VBA initializes random seed.
(a) SIN (b) RND (c) RANDOMIZE (d) SGN
Ans. c
108. _______function in VBA returns sine value of given number.
(a) SIN (b) RND (c) RANDOMIZE (d) SGN
Ans. a
109. _______function in VBA returns a random number.
(a) SIN (b) RND (c) RANDOMIZE (d) SGN
Ans. b
110. _______function in VBA rounds the given number to the nearest integer value.
(a) ROUND (b) SQR (c) TAN (d) SGN
Ans. a
111.______function in VBA returns tangent value of given number.
(a) ROUND (b) SQR (c) TAN (d) SGN
Ans. c
112. ______function in VBA returns square root of given number.
(a) ROUND (b) SQR (c) TAN (d) SGN
Ans. b
113._______function in VBA returns thenumeric value of given character in theAmerican Standard
Code of InformationInterchange (ASCII) system.
(a) ASC (b) CHR (c) & (d) INSTR
Ans. a
114. ________function in VBA returns concatenatednew string from given Stringvalues.
(a) ASC (b) CHR (c) & (d) INSTR
Ans. c
115. ________function in VBA returns charactervalue of given numeric value.
(a) ASC (b) CHR
(c) & (d) INSTR
Ans. b
116.______ function in VBA returns locationat which the second string occurs within the first
string.
(a) ASC (b) CHR (c) & (d) INSTR
Ans. d
117. ____function in VBA returns last locationat which the second string occurs within the first
string.
(a) INSTRREV (b) LCASE (c) LEFT (d) RIGHT
Ans. a
118. _______function in VBA returns lowercaseversion of given string.
(a) INSTRREV (b) LCASE (c) LEFT (d) RIGHT
Ans. b
119. _______ function in VBA returns uppercaseversion of given string.
(a) INSTRREV (b) LCASE (c) LEFT (d) UCASE
Ans. d
120. ______ function in VBA returns givennumber of characters counted from theleft of the string.
(a) INSTRREV (b) LCASE (c) LEFT (d) RIGHT
Ans. c
121._____ function in VBA returns givennumber of characters counted from theright of the string.
(a) INSTRREV (b) LCASE (c) LEFT (d) RIGHT
Ans. d
122. _____function in VBA returns lengthof given string.
(a) LEN (b) LTRIM (c) RTRIM (d) TRIM
Ans. a
123. ______function in VBA removes whitespaces from the left end of given string.
(a) LEN (b) LTRIM (c) RTRIM (d) TRIM
Ans. b
124. ______function in VBA removes whitespaces from the right end of given string.
(a) LEN (b) LTRIM (c) RTRIM (d) TRIM
Ans. c
125. _____function in VBA removes whitespaces from both left and right ends ofgiven string.
(a) LEN (b) LTRIM (c) RTRIM (d) TRIM
Ans. d
126. ______function in VBA extracts a substringfrom given start character for specified count of
characters.
(a) MID (b) REPLACE
(c) SPACE (d) STR
Ans. a
127. _____function in VBA finds givenstring and replaces it with another.
(a) MID (b) REPLACE
(c) SPACE (d) STR
Ans. b
128._____function in VBA returns specified number of spaces.
(a) MID (b) REPLACE (c) SPACE (d) STR
Ans. c
129. _______function in VBA converts givennumber to string.
(a) MID (b) REPLACE (c) SPACE (d) STR
Ans. d
130. ______function in VBA compares givenstrings, returns -1 if the first string issmaller than the
second string, 0 if both are equal and 1 if the first is greater thanthe second string.
(a) STRCOMP (b) STRCONV (c) STRREVERSE (d) VAL
Ans. a
131. _____function in VBA converts given string to uppercase, lowercase, propercase, or unicode.
(a) STRCOMP (b) STRCONV (c) STRREVERSE (d) VAL
Ans. b
132. ______function in VBA reverses given string.
(a) STRCOMP (b) STRCONV (c) STRREVERSE (d) VAL
Ans. c
133.______function in VBA returns numeric value of string.
(a) STRCOMP (b) STRCONV (c) STRREVERSE (d) VAL
Ans. d
134. ______function in VBA returns part of a date (YYYY for year, MM for month and DD for day
of month).
(a) Date (b) DATEADD (c) DATEDIFF (d) DATEPART
Ans. d
135. _______function in VBA returns difference between two dates in specified unit (YYYY for
years, MM for months and DD for days).
(a) Date (b) DATEADD (c) DATEDIFF (d) DATEPART
Ans. c
136. _______function in VBA adds given duration to the specified date (YYYY for years, MM for
months and DD for days).
(a) Date (b) DATEADD (c) DATEDIFF (d) DATEPART
Ans. b
137. _______function in VBA converts given day of month, month and year values to date object.
(a) DATESERIAL (b) DATEVALUE (c) DAY (d) FORMAT
Ans. a
138. ________function in VBA converts a string value to date.
(a) DATESERIAL (b) DATEVALUE (c) DAY (d) FORMAT
Ans. b
139. _______function in VBA returns day of month from given date.
(a) DATESERIAL (b) DATEVALUE
(c) DAY (d) FORMAT
Ans. c
140.______ function in VBA returns formatted date object based on given string.
(a) DATESERIAL (b) DATEVALUE (c) DAY (d) FORMAT
Ans. d
141. ______function in VBA returns month number from given date.
(a) MONTH (b) MONTHNAME (c) HOUR (d) MINUTE
Ans. a
142. ______function in VBA returns name of month from given date.
(a) MONTH (b) MONTHNAME (c) HOUR (d) MINUTE
Ans. b
143. ______function in VBA returns hour of day for given time.
(a) MONTH (b) MONTHNAME (c) HOUR (d) MINUTE
Ans. c
144. ______function in VBA returns minute of hour for given time.
(a) MONTH (b) MONTHNAME (c) HOUR (d) MINUTE
Ans. d
145. ______function in VBA returns year number from given date object.
(a) YEAR (b) MONTHNAME (c) HOUR (d) MINUTE
Ans. a
146.______ function in VBA converts a string to time object.
(a) NOW (b) TIMESERIAL (c) TIMEVALUE (d) WEEKDAY
Ans. c
147. ______function in VBA returns day of week.
(a) NOW (b) TIMESERIAL (c) TIMEVALUE (d) WEEKDAY
Ans. d
148.______function in VBA returns name of the day of week.
(a) NOW (b) TIMESERIAL (c) TIMEVALUE (d) WEEKDAYNAME
Ans. d
149. Variables which can be accessed using index values (from 0 to given number) are called
____ .
(a) Array (b) Integer (c) Double (d) Single
Ans. a
150. Arrays can be created by_______ .
(a) declaring array with a size
(b) declaring array without size but populating it to desired size
(c) resizing array using REDIM command
(d) all of them
Ans. d
151. The following declaration creates an array having_____ number of elements. Dim a(3)
(a) 3 values indexed from 0 to 2 (b) 4 values indexed from 0 to 3
(c) 3 values indexed from 1 to 3 (d) 0 values indexed 0
Ans. b
152. From the following VBA code, select the correct statement from given choices:
Dim a(1)
a(0)=10
a(1)=20
REDIM PRESERVE a(2)
a(2)=30
(a) declares an array a with 2 elements
(b) assigns 10 and 20 at indices 0 and 1
(c) resizes the array to have 3 elements and assigns 30 to array index 2
(d) all of them
Ans. d
153. A matrix can be represented using a _______dimensional array in VBA.
(a) 1 (b) 2 (c) 3 (d) 4
Ans. b
154. The following VBA statement declares a _______dimensional array.
Dim a(3,4)
(a) 1 (b) 2 (c) 3 (d) 4
Ans. b
155. ______ keyword in VBA causes previous elements of array to be kept in the new array.
(a) NEW (b) DIM (c) PRESERVE (d) NEXT
Ans. c
156.______ function in VBA returns the smallest index for given array.
(a) LBOUND (b) UBOUND (c) SPLIT (d) JOIN
Ans. a
157. ______function in VBA returns the largest index for given array.
(a) LBOUND (b) UBOUND (c) SPLIT (d) JOIN
Ans. b
159. _______function in VBA divides a string into an array at the occurrence of specified
substring.
(a) LBOUND (b) UBOUND (c) SPLIT (d) JOIN
Ans. c
160._____ function in VBA joins elements of an array and creates a string with specified
separator.
(a) LBOUND (b) UBOUND (c) SPLIT (d) JOIN
Ans. d
161. ______function in VBA returns elements which fulfill certain search criterion.
(a) ISARRAY (b) FILTER (c) ERASE (d) none of them
Ans. b
162. _____function in VBA returns true if the argument is an array.
(a) ISARRAY
(b) FILTER
(c) ERASE
(d) none of them
Ans. a
163. ____function in VBA removes all elements of an array.
(a) ISARRAY (b) FILTER (c) ERASE (d) none of them
Ans. c
164. ____and_____ are the conditional statements available in VBA.
(a) IF ... Then and Select Case
(b) For and While
(c) Do While and Do Until
(d) none of them
Ans. a
165. Several successive conditions may be checked using ______statement of IF condition.
(a) ElseIf (b) End If (c) Else (d) Then
Ans. a
166. In case none of the conditions in an IF ladder is fulfilled, statements in____ block are
executed.
(a) ElseIf (b) End If (c) Else (d) Then
Ans. c
167. In the following VBA code, find out the possible bug/error:
Dim x as Integer
x=5
If x < 5
End If
(a) End If is missing
(b) Then keyword is missing at the end of If
(c) The condition in If statement is incorrect
(d) none of them
Ans. b
168. _____condition takes a value and compares it against several Case statements.
(a) Case
(b) Select Case
(c) End Select
(d) Case Else
Ans. b
169. Select Case condition ends with ______statement.
(a) Case
(b) Select
(c) End Select
(d) Case Else
Ans. c
170. _____condition is matched if none of the Case conditions of Select Case is matched.
(a) Case
(b) Select
(c) End Select
(d) Case Else
Ans. d
171. What would be the value of y after the execution of the following VBA code:
Dim x, y as Integer
x=5
Select Case x
Case 0
y = 10
Case 1
y=20
Case 2
y=30
Case Else
y=100
End Select
(a) 10 (b) 20 (c) 30 (d) 100
Ans. d
172. For statement uses_______ to specify the increment to index value.
(a) Step (b) To (c) Next (d) Each
Ans. a
173. ______loop in VBA takes each element of an array one by one.
(a) For (b) For Each (c) While (d) Do While
Ans. b
174. While loop in VBA ends with________ statement.
(a) End (b) Loop (c) Next (d) Wend
Ans. d
175. Do While statement executes till the given condition is______ .
(a) false (b) true (c) both true and false (d) neither true nor false
Ans. b
176. Do Until statement executes till the given condition is______ .
(a) false
(b) true
(c) both true and false
(d) neither true nor false
Ans. a
177. MsgBox function in VBA takes a______ as the first and mandatory parameter.
(a) String (b) Integer (c) Double (d) Long
Ans. a
178. The second parameter of MsgBox in VBA is _____ to control the buttons of the dialog.
(a) Integer (b) Long (c) Single (d) Double
Ans. a
179. MsgBoxmay be provided the option ______to display only the OK button.
(a) vbYesNoCancel
(b) vbAbortRetryIgnore
(c) vbOKCancel
(d) vbOKOnly
Ans. d
180. MsgBoxmay be provided the option______ to display the OK and Cancel buttons.
(a) vbYesNoCancel
(b) vbAbortRetryIgnore
(c) vbOKCancel
(d) vbOKOnly
Ans. c
181. MsgBoxmay be provided the option_____ to display the Yes, No and Cancel buttons.
(a) vbYesNoCancel
(b) vbAbortRetryIgnore
(c) vbOKCancel
(d) vbOKOnly
Ans. a
182. MsgBoxmay be provided the option _______to display the Abort, Retry and Ignore buttons.
(a) vbYesNoCancel
(b) vbAbortRetryIgnore
(c) vbOKCancel
(d) vbOKOnly
Ans. b
183. MsgBoxmay be provided the option_____ to display the Yes and No buttons.
(a) vbYesNo
(b) vbRetryCancel
(c) vbCritical
(d) vbQuestion
Ans. a
184. MsgBoxmay be provided the option _____to display the Retry and Cancel buttons.
(a) vbYesNo
(b) vbRetryCancel
(c) vbCritical
(d) vbQuestion
Ans. b
185. MsgBoxmay be provided the option _______to display critical error message.
(a) vbYesNo
(b) vbRetryCancel
(c) vbCritical
(d) vbQuestion
Ans. c
186. MsgBoxmay be provided the option______ to display a warning query.
(a) vbYesNo
(b) vbRetryCancel
(c) vbCritical
(d) vbQuestion
Ans. d
187. MsgBoxmay be provided the option _______to display an exclamation message.
(a) vbExclamation (b) vbInformation
(c) vbDefaultButton1 (d) vbDefaultButton2
Ans. a
188. MsgBoxmay be provided the option______ to display an information message.
(a) vbExclamation
(b) vbInformation
(c) vbDefaultButton1
(d) vbDefaultButton2
Ans. b
189. MsgBoxmay be provided the option_______ to keep the first button as the default button.
(a) vbDefaultButton1
(b) vbDefaultButton2
(c) vbDefaultButton3
(d) vbDefaultButton4
Ans. a
190. MsgBoxmay be provided the option_______ to keep the second button as the default button.
(a) vbDefaultButton1
(b) vbDefaultButton2
(c) vbDefaultButton3
(d) vbDefaultButton4
Ans. b
191. MsgBoxmay be provided the option_____ to keep the third button as the default button.
(a) vbDefaultButton1
(b) vbDefaultButton2
(c) vbDefaultButton3
(d) vbDefaultButton4
Ans. c
192. MsgBoxmay be provided the option______ to keep the fourth button as the default button.
(a) vbDefaultButton1
(b) vbDefaultButton2
(c) vbDefaultButton3
(d) vbDefaultButton4
Ans. d
193._____value in MsgBox function of VBA checks whether OK button wasclicked.
(a) vbOK (b) VKCancel (c) vbAbort (d) vbRetry
Ans. a
194. _____value in MsgBox function of VBA checks whether Cancel button was clicked.
(a) vbOK (b) VKCancel (c) vbAbort (d) vbRetry
Ans. b
195. _____value in MsgBox function of VBA checks whether Abort button was clicked.
(a) vbOK (b) VKCancel (c) vbAbort (d) vbRetry
Ans. c
196. ____value in MsgBox function of VBA checks whether Retrybutton was clicked.
(a) vbOK
(b) VKCancel
(c) vbAbort
(d) vbRetry
Ans. d
197. Input box in VBA can be displayed using______ function.
(a) MsgBox (b) InputBox (c) box (d) none of them
Ans. b
198. The first parameter of InputBox is ____for the input dialog.
(a) prompt message
(b) title of dialog
(c) both a & b
(d) neither a nor b
Ans. a
199. The second parameter of InputBox is _______for the input dialog.
(a) prompt message
(b) title of dialog
(c) both a & b
(d) neither a nor b
Ans. b
200. The return value of a function is assigned to variable named______ .
(a) something other than the name of the function
(b) exactly matching the name of the function
(c) return
(d) end
Ans. b
201. Unlike subroutines or procedures, function can _____a value.
(a) return (b) nullify (c) add (d) subtract
Ans. a
202. In a VBA project, inserting a_____ helps to create new function.
(a) UserForm (b) Class Module (c) Module (d) none of them
Ans. c
203. A subroutine begins with______ keyword.
(a) Function (b) End Function (c) return (d) Sub
Ans. d
204. A subroutine ends with ______statement.
(a) Function (b) End Sub (c) return (d) none of them
Ans. b
205. Subroutines are otherwise called________.
(a) procedures (b) conditions (c) loops (d) none of them
Ans. a
206. Subroutines________return a value.
(a) do not
(b) do
(c) may or may not
(d) none of them
Ans. a
207. In a VBA project, _____are handled using subroutines.
(a) GUI events
(b) all computations
(c) all variables
(d) none of them
Ans. a
208. Macro can be recorded using ______icon in the View menu.
(a) macro (b) micro (c) Font (d) Paragraph
Ans. a
209. A class can be created by inserting________ in a VBA project.
(a) UserForm(b) class module (c) module (d) none of them
Ans. b
210. Class name in a VBA project can be changed through______ .
(a) Name property in properties window
(b) UserForm
(c) Module
(d) none of them
Ans. a
211. Class in VBA supports ______ of Object Oriented Programming System.
(a) Property (b) Function (c) Subroutine (d) all of them
Ans. d
212. VBA supports______ keyword for access control.
(a) Private (b) Public (c) both a & b (d) none of them
Ans. c
213. A property in VBA can be assigned new value through ______keyword.
(a) Set (b) Let (c) Get (d) none of them
Ans. b
214. The value of a property can be obtained using _______keyword.
(a) Set (b) Let (c) Get (d) none of them
Ans. c
215. The variable declared using a new class can be initialized using_____ keyword.
(a) Set (b) Let (c) Get (d) none of them
Ans. a
216. Find the name of the property created using the following lines of VBA code:
Private s as Integer
Public Property Let Score(x as Integer)
s = x
End Property
Public Property Get Score() as Integer
Score = s
End Property
(a) s (b) Let (c) Get (d) Score
Ans. d
217. GUI supports visual components like CommandButton, Label, TexBox, ComboBox,
OptionBox, MultiPage, List, etc. which generate ______on user interaction.
(a) events (b) properties (c) functions (d) subroutines
Ans. a
218. Events wait like hidden armoury until _______ aoccurs.
(a) packing (b) trigger (c) cleaning (d) deletion
Ans. b
219. Events fired from components are handled by______ linked to those events.
(a) functions (b) properties (c) variables (d) subroutines
Ans. d
220. A large window which supports placement of other components on its surface is called
_____.
(a) CommandButton (b) Label
(c) UserForm (d) TextBox
Ans. c
221. The______ member supports Run from Run menu of VBA IDE.
(a) CommandButton (b) Label
(c) UserForm (d) TextBox
Ans. c
222. UserForm supports ______for control of its window.
(a) maximize (b) iconify (c) close/ exit (d) all of them
Ans. d
223. ______ is suitable to start computation after collecting required input data for processing.
(a) CommandButton (b) Label (c) UserForm (d) TextBox
Ans. a
224. _____ is suitable to display a prompt message to collect input data.
(a) CommandButton (b) Label (c) UserForm (d) TextBox
Ans. b
225. _______ is creates an input box with a tick mark.
(a) CheckBox (b) OptionBox (c) List (d) ToggleButton
Ans. a
226. ______is creates a box with a circular dot, which can be receives tick only if all related boxes
become switched o_.
(a) CheckBox (b) OptionBox (c) List (d) ToggleButton
Ans. b
227.______ is creates a box with a triangular button, clicking which displays a number of input
values.
(a) ComboBox (b) OptionBox (c) List (d) ToggleButton
Ans. a
228. ______ is creates a box with a scrollable list containing a number of input values.
(a) ComboBox (b) OptionBox (c) List (d) ToggleButton
Ans. c
229. _____is creates a control which remains pressed or released after each click.
(a) ComboBox (b) OptionBox (c) List (d) ToggleButton
Ans. d
230.______ is creates controls help to create sets of components which can be brought to view by
clicking a button at top.
(a) TabStrip
(b) MultiPage
(c) both a & b
(d) neither a nor b
Ans. c
231. _______control can be used to set numeric values in other components.
(a) SpinBox (b) Image (c) RefEdit (d) Label
Ans. a
232. ______control can be used to display an image.
(a) SpinBox (b) Image (c) RefEdit (d) Label
Ans. b
233. ______control can be used to select a range from the spreadsheet when the VBA program
runs.
(a) SpinBox (b) Image (c) RefEdit (d) Label
Ans. c
234. Properties window can be accessed by placing a_____ after the name of a variable.
(a) dot (.) (b) $ (c) # (d) ^
Ans. a
235. When a User-Form gets ready, _____event is fired.
(a) Activate (b) BeforeDragOver
(c) BeforeDropOrPaste (d) Click
Ans. a
236. When content is about to be dragged over a VBA control, it gets____ event.
(a) Activate (b) BeforeDragOver (c) BeforeDropOrPaste (d) Click
Ans. b
237. When some content is about to be droped or pasted on a VBA control, it gets ______event.
(a) Activate (b) BeforeDragOver (c) BeforeDropOrPaste (d) Click
Ans. c
238. When a VBA control is clicked, it generates ______event.
(a) Activate
(b) BeforeDragOver
(c) BeforeDropOrPaste
(d) Click
Ans. d
239. When a VBA control is double clicked, it generates _____event.
(a) DblClick (b) Deactivate (c) Error (d) Click
Ans. a
240. When a VBA control is deactivated, it generates______ event.
(a) DblClick (b) Deactivate (c) Error (d) Click
Ans. b
241. When a VBA control is encounters some error, it generates_____ event.
(a) DblClick (b) Deactivate (c) Error (d) Click
Ans. c
242. When a VBA control is initilized, it generates _____event.
(a) Initialize (b) KeyDown (c) KeyPress (d) KeyUp
Ans. a
243. When a key in the keyboard is pressed with focus on a VBA control, it generates _____event.
(a) Initialize (b) KeyDown` (c) KeyPress (d) KeyUp
Ans. c
244. When a key in the keyboard is pushed down with focus on a VBA control, it generates
_____ event.
(a) Initialize (b) KeyDown (c) KeyPress (d) KeyUp
Ans. b
245. When a key in the keyboard is released with focus on a VBA control, it generates
_____event.
(a) Initialize (b) KeyDown (c) KeyPress (d) KeyUp
Ans. d
246. When mouse button is pushed down on a VBA component, ______event is generated.
(a) MouseDown (b) MouseMove (c) MouseUp (d) QueryClose
Ans. a
247. When mouse moves over a VBA component, _______event is generated.
(a) MouseDown (b) MouseMove (c) MouseUp (d) QueryClose
Ans. b
248. When mouse button is released after clicking a VBA component, ______event is generated.
(a) MouseDown (b) MouseMove (c) MouseUp (d) QueryClose
Ans. c
249. When query closes, the UserForm in VBA_______ receives event.
(a) MouseDown (b) MouseMove (c) MouseUp (d) QueryClose
Ans. d
250. A set of Windows components, each one created for specific works related to content
downloaded from the World Wide Web is called______ controls.
(a) ActiveX (b) X-Window (c) Visual (d) Spreadsheet
Ans. a
251. ADODB Connection object may be initialized using ______statement.
(a) Dim conn as New ADODB.Connection
(b) Dim rs as New ADODB.RecordSet
(c) both a & b
(d) neither a nor b
Ans. a
252. ADODB RecordSet object may be initialized using ______statement.
(a) Dim conn as New ADODB.Connection
(b) Dim rs as New ADODB.RecordSet
(c) both a & b
(d) neither a nor b
Ans. b
253. ________ method of ADODC connection opens a database connection.
(a) Open (b) Close (c) Make (d) Query
Ans. a
254. In a query performed on data contained in Excel spreadsheet (say Sheet1), table name
should be replaced by_______ name.
(a) [Sheet1&] (b) [Sheet1$] (c) [Sheet1#] (d) [Sheet1%]
Ans. b
255. The IDE of VBA provides______ to indicate errors immediately on typing.
(a) coloring
(b) popup
(c) both a & b
(d) neither a nor b
Ans. c
256. A breakpoint may be inserted using_______.
(a) a click on the margin to the left of a line
(b) pressing F9 when cursor is in the line
(c) both a & b
(d) neither a nor b
Ans. c
257. When a runtime error occurs, choose ______from the dialog to correct the program.
(a) End (b) Debug (c) Stop (d) Continue
Ans. b
258. After program stops due to error or breakpoint, hovering mouse over a variable _______.
(a) ignores the variable (b) deletes the variable
(c) displays the value of the variable (d) resets the variable
Ans. c
259. Using a variable on the right side of computation expression without assigning any value to
the variable is may result in________.
(a) junk result (b) crashing of program
(c) both a & b (d) neither a nor b
Ans. c
260. After program stops due to error or breakpoint, trial code lines may be entered in______ to
see the result of changes on the program.
(a) Immediate Window
(b) Properties Window
(c) Code Window
(d) Project Explorer
Ans. a
261. Which VBA built in function returns location at the second string occurs within the first string?
A) Mid() B) Chr() C)ASC() D) Instr()
Ans. d
262. Which keyword is used to declare the variables in project scope?
A Static B Private C Public D Protect
Ans. c
263. In VBA, How many types of access specifiers available in VBA?
A 2 B 3 C 4 D 6
Ans. a
264. Which type of variable cannot be declared within a procedure in VBA?
A Project scope B Local scope C Global scope D Module scope
Ans. d
265. Which variable recognized only within the procedure in which it is declared?
A Local scope B Module scope C Global scope D Project scope
Ans. a
266. How many levels of variable scope available in VBA?
A 2 B 3 C 4 D 7
Ans. c
267. 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
Ans. c
268. 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()
Ans. b
269. 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()
Ans. a
270. Which color of dot indicate the breakpoint in VBA?
A Grey B Yellow C Maroon D Red
Ans. d
271. Which shortcut key is used to set the properties of form while designing?
A F4 B Ctrl + F4 C Alt + F4 D Shift + F4
Ans. a
272. Which shortcut key is used to open code window in VBA?
A F7
B Alt + F7
C Ctrl + F7
D Shift + F7
Ans. a
273. 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
Ans. b
274. Which character is to be suffixed for long data type in VBA?
A & B ! C # D @
Ans. a
275. How many numeric data types available in Excel VBA?
A 4 B 5 C 7 D 8
Ans. c
276. What is the another name for keywords in VBA?
A Literals B Variables C User defined words D Reserved words
Ans. d
277. Which key word is used to declare the variable in VBA?
A Sub B Declare C Dim D AS
Ans. c
278. Which entitie hold data in VBA?
A Literals B Constants C Keywords D Variables
Ans. d
279. Which worksheet method is used to copy a sheet to another location in the workbook?
A Activate B Copy C Save AS D Select
Ans. b
280. Which VBA worksheet property return or sets a string value that represents the object name?
A Name B Index C Range D Cells
Ans. a
281. Which method displays the data form associated with the worksheet in VBA?
A Copy B Printout C Show Data Form D Select
Ans. c
282. Which VBA property returns a range object that represents all the cells on the worksheet?
A Cells B Rows C Index D Name
Ans. a
283. Which object is member of the workbook?
A Sheets B Workbook C Worksheet D Range
Ans. c
284. Which type of work book method cannot be modified in VBA?
A Close B Save C Save AS D Protect
Ans. d
285. 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
Ans. a
286. 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
Ans. c
287. Which button has three states in VBA?
A Option button B Spin button
C Push button D Command button
Ans. a
289. 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
Ans. b
290. Where does Excel come in object hierarchy of VBA?
A Range object B Workbook object
C Worksheet object D Application object
Ans. d
291. Which shortcut key is used to open project explorer window in VBA?
A Ctrl + R B Ctrl + P C Ctrl + W D Ctrl + E
Ans. a
292. 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
Ans. b
293. Which shortcut key is used to step into line - by - line execution in VBA?
A F2 B F4 C F5 D F8
Ans. d
294. What is called the set of commands bundled together under one name?
A Properties B Macros C Procedures D Events
Ans. b
295. What is called the set of statement that are executed under one name?
A Macros B Properties C Procedures D Events
Ans. c
296. Which one is attributes of an object in VBA?
A Procedures B Events C Macros D Properties
Ans. d
297. What is called double clicking an object in VBA?
A Events B Macros C Procedures D Methods
Ans. a
298. Which is used to type / edit the programming code in VBA?
A Form window B Properties window
C Immediate window D Visual basic editor
Ans. d
299. Which simplifies the work to be eliminating or rewriting the code in VBA?
A Class B Object C Macros D Functions
Ans. c
300. Which type of variable can be accessed or used by subroutines outside the modules in
VBA?
A Static B Private C Protect D Public
Ans. d
301.Where there is no difference between dim and private in VBA?
A Local scope B Module scope C Global scope D Project scope
Ans. b
302.Which method is used to pass the reference to the arguments?
A Ref B Val C Reference D By Ref
Ans. d
303.Which function is used to check whether the given input is numeric or Not in VBA?
A Numeric() B Isnumber() C Isnumeric() D Isnum()
Ans. c
304.Which function returns specified part of a given date in VBA?
A Day() B Datevalue() C Datediff() D Datepart()
Ans. d
305.What is the return type of CSng function in VBA?
A Boolean B Variant C Single D String
Ans. c
306.Which is used to repeats the same steps in case of frequency needed actions in VBA?
A Class B Object C Functions D Macros
Ans. d
307.Which function returns the integer portion of a number in VBA?
A Int() B Format() C Abs() D Sign()
Ans. a
308.Which mathematical function generates a random number in VBA?
A Random() B Rnd() C Rand() D Round()
Ans. b
309.Which operators are concatenation operator in VBA?
A + and - B & and - C & and + D & and *
Ans. c
310.Which type of words cannot use for any other purpose in VBA?
A Literals B Keywords C Constants D Variables
Ans. b
311.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
Ans. d
312.Which box has three states in VBA?
A List box B Combo box C Check box D Group box
Ans. c
313.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
Ans. d
314.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
Ans. a
315.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
Ans. b
316.Which shortcut key is used to open the immediate window?
A Ctrl + G B Ctrl + L C Alt + G D Alt + L
Ans. a
317.What is the another name trigger for an action in VBA?
A Methods B Modules C Events D Macros
Ans. c
318.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
Ans. c
319.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
Ans. b
320.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
Ans. a
321.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
Ans. b
322.What will be the output for the following VBA code?
Debug.printDateDiff(“yyyy”,”1/12/2016”,”31/1/2017”)
A 0 B 1 C 11 D 30
Ans. b
323.What will be the output of the following VBA code?
Sub test()
x = “institue”
Debug.printFormat(x,”>”)
End sub
A Institute B institute C INSTITUTE D instiTUTE
Ans. c
324.What will be the output of the following VBA code?
Sub test()
a = “ Computer operator”
Debug.Printleft(a,10)
End sub
AOperator B Computer o C Computer D Computer operator
Ans. b
325. Macros must be saved in Excel workbook with this extension.
a) .xlsx b) .htm c) .xlsm d) .vba
Ans. c
326. You can check a workbook’s macro security setting in :
a) The backstage view b) The trust center c) The excel options window d) Review tab
Ans. b
327. The security warning bar does not open when you open a workbook with macros if you
choose:
a) open special b) Enable all macros c) edit anyway d) Trust this document
Ans. b
328. Instead of typing the code or instructions in a macro program, you:
a) Record it b) Insert it c) copy it d) import it
Ans. a
329. To activate a file in a personal macro workbook, you must first:
a) save it b) Record a practice macro c) import your macros d) Add a VBA command
Ans. b
330. A single workbook is called an object while more than one workbooks are called:
a) a collection b) a gallery c) a code d) a volume.
Ans. a
331. In visual basic, each line preceded by an apostrophe and shown in green is a:
a) Macro b) Tag c) Sub d) Comment
Ans. d
332. You can tell when an excel template is macro- enabled by looking at its extension.
a) Extension b) Name c) Tabs d) Layout
Ans. a
333. To run a macro that was recorded with relative reference, you must first:
a) save it b) select it c) enable it d) activate a cell
Ans. d
334. When you create a workbook from an excel macro-enabled template, you must first click:
a) Open normally b) Enable content c) Edit anyway d) Open in safe mode
Ans. b
335. To run a macro with a single click, assign a:
a) Button b) Shortcut c) Key code d) Special character
Ans. a
336. To open the visual basic editor with a keystroke, press:
a) Alt+0 b) Windows c) Shift + enter d) F11
Ans. d
337. You can find a button which toggles between Record Macro and Stop Recording in the :
a) Backstage view b) Macro view c) Status bar d) View menu
Ans. c
338. ______is used for finding out about objects, properties and methods.
a) Form layout window b) code editor window c) Object browse d) None of these
Ans. c
339. ______function is used to return a copy of a string without leading spaces.
a) Rtrim b) Ltrim c) Trim d) All of these
Ans. b
340. The variable that does not change the value during execution of program is______
a) Numeric b) String c) Constant d) None of these
Ans. c
341. ______is a method which moves the focus to the specified control or form.
a) Setfocus b) Lostfocus c) Gotfocus d) None of these
Ans. a
342. The function procedures are _____by default.
a) Public b) Private c) Protected d) None of these
Ans. a
343. ______is a data type that can be used to declare a text of maximum 10 million characters.
a) Data b) Ulog c) Numeric d) String
Ans. d
344. Variable are named storage locations in memory, the value of which does not change during
program______
a) debug b) design c) execution d) All of the above
Ans. c
345. The default property for a text box control is ______
a) text b) enable c) multiline d) password char
Ans. a
346. _____ is a collection of files.
a) class b) group c) project d) All of these
Ans. c
347. The method, which loads the form into memory and displays it on screen
a) Load b) Show c) Display d) All of these
Ans. b
348. The code in an application can be broken into logical components by_____ process.
a) Modular b) Procedural c) partitioning d) none of these
Ans. c
349. The window in which the individual documents are displayed is called_____ window.
a) main b) child c) parent d) Root
Ans. b
350. A ______ variable is one that is declared inside a procedure.
a) global b) local c) external d) none of these
Ans. b
351. ______ control executes the timer events at specified intervals of time.
a) clock B) frame c) timer d) digital
Ans. c
352. A _____ control in visual basic is used to create applications that present information in rows
and columns.
a) MSGridLine b) MSLineGrid c) MSGridFlex d) MSFlexGrid
Ans. d
353. ______ cannot be declared in a form or class module.
a) Static constants b) Private constants c) Public constants d) None of these
Ans. c
354. ______ do not return a value.
a) Sub procedure b) Function procedure c) property procedures d) all of these
Ans. a
355. The default datatype for VB is ____
a) integer b) Decimal c) Variant d) String
Ans. c
356. ______ is a build in function to return lower bound of an array.
a) Lbound() b) LRbound() c) Lowbound() d) None of these
Ans. a
357. The _____ allows direct exit from a For loop, Do loop, Sub procedure, or Function procedure.
a) Break b) Exit c) Exit for d) Exit Do
Ans. b
358. ______ displays current directory with any subdirectories and allows the used to change
directory.
a) FileListBox b) DirListBox c) DriveListBox d) All of these
Ans. b
359. Extension of Active X designers ______
a) .dsr b) .axd c) .adx d) None of these
Ans. a
360. ______ statement enables us to trap runtime error.
a) Error b) On Error c) On runtime Error d) All of these
Ans. b
361. Frame control acts as a _____
a) Event b) Method c) Class d) container
Ans. d
362. Form_MouseDown() procedure is executed when any mouse button is clicked in a free area
of the_____.
a) Form b) window c) screen d) none of these
Ans. a
363. ____ method removes a dialog box from view.
a) Enabled b) Disable c) Hide d) Display
Ans. c
364. The____ is a tool used for both the input and output purpose.
a) Label b) text box c) combo box d) command button
Ans. b
365. ____method is used to clear the contents of MSHFlexGrid control.
a) Clr b) Cls c) Removeltem d) Clear
Ans. d
366. The _______ property is used in VB for maximum form at run time.
a) caption b) window resize c) window status d) none of these
Ans. c
367. ______ is property is used to hide the content in textbox with some symbols.
a) Name b) Caption c) Hidden d) Password char
Ans. d
368. ______ method is used to retrieve the stored text from the clipboard.
a) input b) Gettext c) Addtext d) Settext
Ans. b
369. _______ control displays current directory with any sub directories and allows the user to
change directly.
a) File list box b) Drive list box c) Directory list box d) All of these
Ans. c
370. ____ control is used to represent the items in a hierarchical manner.
a) Tree view b) Grid view c) Progress bar d) None of these
Ans. a
371. Which is not a property of the common control class?
a) show b) font c) BackColor d) ForeColor
Ans. a
372. Which symbol creates an access key in the text of a menu item?
a) @ b) & c) $ d) #
Ans. b
373. When the form Is first referenced in any manner by program, the triggered event is…
a) Load b) Activate c) Initialize d) None of these
Ans. c
374. The properties window plays an important role in the development of visual basic
applications. It is mainly used
a) To change how objects look and feel
b) When opening programs stored on a hard drive
c) To allow the developer to graphically design program components
d) To set program related options like program Name, Program location, etc
Ans. a
375. What is the different between iserror and iserr?
a) Iserr excludes #n/A and returns the value
b) both are same
c) Iserror excludes #n/A and returns the value
d) Iserr returns when the value is #value
Ans. a
376. VBA is:
a) a Microsoft programming language used to extend excel functions
b) a statistical tool developed by Microsoft for financial analysts
c) an open-source programming environment
d) a Microsoft programming environment that replaces Excel
Ans. a
377. One or more option button controls can be selected from _____ choices.
A. multiple. B. single. C. dual. D. parallel.
ANSWER: A
378. _____ bar contains a set of tools to provide controls in the Form.
A. Status. B. Tool C. Menu. D. Progress.
ANSWER: C
379. Debug window is the same as ____ window.
A. procedure. B. object. C. form. D. code.
ANSWER: D
380. Code window consists of a ______ box and procedure list box.
A. object. B. event. C. tool. D. message.
ANSWER: A
381. The ____ statement checks in the module for usage of any undeclared variables and reports
an error to the user.
A. looping. B. iteration. C. dim. D. external.
ANSWER: C
382. Dynamic arrays can be declared when the user may not know the _____of the array at
design time.
A. exact column. B. exact variable. C. exact value. D. exact size.
ANSWER: D
383. Variables are named storage locations in memory, the value of which does not change during
program______.
A. design. B. execution. C. debug. D. modification.
ANSWER: B
384. Variables of different data types when combined as a single variable to hold several related
information is called as ______ data types.
A. numeric. B. user defined. C. string. D. byte.
ANSWER: B
385. ____box provides a set of choices to the user.
A. List. B. Command. C. Combo. D. Text.
ANSWER: A
386. All the controls in an array will have the same _____.
A. Value. B. properties. C. address. D. location
ANSWER: B
387. The _____property in Visual basic is common for many a tools.
A. location. B. place. C. window status. D. name.
ANSWER: D
388. Option button can be grouped in a ______control.
A. label. B. text box. C. frame. D. check box.
ANSWER: C
389. A _____ bar appears in the top of the screen.
A. title. B. menu. C. tool. D. debug.
ANSWER: A
390. Form_Mouse Down ( ) procedure is executed when any mouse button is clicked in a free
area of the ______.
A. window. B. form. C. screen. D. property.
ANSWER: B
391. _____ is a tool used in visual basic to draw rectangle in the form.
A. Textbox. B. Option button. C. Command button. D. Shape.
ANSWER: D
392. In visual basic ______ is the extension to represent project file.
A. .frm. B. .vbp. C. .cls. D. .txt.
ANSWER: B
393. In default ____ numbers of tools exist in toolbox.
A. 20. B. 15. C. 10. D. 8.
ANSWER: A
394. _____ method removes a dialog box from view.
A. Display.
B. Active.
C. Hide.
D. Enabled.
ANSWER: C
395. The ______property of a form automatically sizes the picture loaded to it.
A. auto size. B. default. C. size. D. height.
ANSWER: A
396. While entering a new project ______ option to be select from the dialog box.
A. open exe. B. standard exe. C. activex exe. D. activexdll .
ANSWER: B
397. The ______control used to insert image to the form.
A. text box. B. shape. C. option. D. picture.
ANSWER: D
398. The Line method can be used to draw ______ shape in VB.
A. rectangle. B. circle. C. ellipse D. oval
ANSWER: A
399. There can be only ____MDI form in an application.
A. four. B. two. C. one. D. zero.
ANSWER: C
400. In Visual basic more than one child _____ is allowed to add in project.
A. form. B. window. C. property. D. codings.
ANSWER: A
401. A function begins with ______keyword.
(a) Function (b) End Function (c) return (d) none of them
Ans. a
402. A function ends with_____ statement.
(a) Function (b) End Function (c) return (d) none of them
Ans. b
403. A piece of code automatically generated by an MS Office program based on the actions of
user is called_____.
(a) function (b) subroutine (c) macro (d) micro
Ans. c
404. _______is suitable to collect text input from the user.
(a) CommandButton (b) Label (c) UserForm (d) TextBox
Ans. d
405. ADODC stands for______ .
(a) ActiveX Device Object Data Control (b) Anti-Data Object Data Control
(c) ActiveX Data Object Data Control (d) ActiveX Double Object Data Control
Ans. c
406. ADODB stands for______.
(a) ActiveX Device Object Data Base
(b) Anti-Data Object Data Base
(c) ActiveX Data Object Data Base
(d) ActiveX Double Object Data Base
Ans. c
407. What is the full form of UDF in VBA?
A User Data Functions B User Defined Functions
C Undefined Functions D Used Data Functions
Ans. b
408. Which of the following is logical operator in VBA?
A + B - C * D And
Ans. d
409. Which is used to create user interface forms?
A C B VBA C HTML D Javascript
Ans. b
410. What is the alternate name of Bugs?
A Errors B Keywords C Variables D Constants
Ans. a
411. The first key in a macro shortcut is always:
a) shift b) ctrl c) alt d) Equal sign (=)
Ans. b
412. Visual basic is a tool that allows you to develop application in______
a) Real time b) Graphical user interface c) character user interface d) None
Ans. b
413. In visual basic, a variable name cannot be more than ______ characters.
a) 255 b) 300 c) 355 d) 400
Ans. a
414. MDI stands for_______.
a) Multiple document interface b) Multiple design interface
c) Manipulated document interface d) menu design interface
Ans. a
415. In visual basic _____ types of scroll bars available in visual basic.
A. two. B. three. C. four. D. five.
ANSWER: A
1. VBA stands for_________
a) video basic application
b) visual basic application
c) virtual basic application
d) video basic
2. In VBA ________ is a place to store a piece of information.
a) design view
b) Coding view
c) Compartment
d) Edit menu
3. IDE stands for .
(a) Internal Development Environment
(b) Integrated Design Environment
(c) Integrated Development Environment
(d) Integrated Drafting Environment
4. RAD in the design applications stands for
(a) Ready Application Development
(b) Rapid Application Development
(c) Real Application Development
(d) Rapid Analysis Development
5. GUI stands for .
(a) General User Interface
(b) Graphical User Interaction
(c) Graphical User Interface
(d) Graphical Unified Interface
6. MS Office records macros in language.
(a) VBA (b) C++ (c) C# (d) Java
7. Excel file having VBA code is saved using the extension .
(a) .xlsx (b) .xlsm
(c) .xlst d) .xls
8. Comment in VBA begins with character and continues till the end of that line.
(a) & (b) " (c) ' (d) /
9. Characters should not be used in VBA variable names.
(a) ' ', . (b) @, &
(c) $, # (d) all of them
10._______ is the shortcut to display help in VBA IDE.
(a) F9 (b) F5 (c) F1 (d) F2
11. ______ is the shortcut to run a program in VBA IDE.
(a) F9 (b) F5 (c) F1 (d) F2
12. _______function in VBA displays a message.
(a) Format (b) CVErr
(c) InputBox (d) MsgBox
13. _______function in VBA displays an input box.
(a) Format (b) CVErr
(c) InputBox (d) MsgBox
14. _______data type in VBA stores true or false values.
(a) Boolean
(b) Integer
(c) Byte
(d) Long
15. Choose the result of the following VBA expression: x = "20" + "32"
(a) 2032 (b) 52
(c) 3220 (d) ""
16. The______ operator in VBA returns true if atleast one of the 2 expressions is true.
(a) OR (b) AND
(c) NOT (d) XOR
17. ______function in VBA returns today's date.
(a) Date (b) DATEADD
(c) DATEDIFF (d) DATEPART
18. _____function in VBA returns current time.
(a) NOW (b) TIMESERIAL
(c) TIMEVALUE (d) WEEKDAY
19. IF condition in VBA ends with _______ statement.
(a) ElseIf (b) End If
(c) Else (d) Then
20. _____ is the loop available in VBA.
(a) For and While
(b) Do While and Do Until
(c) For Each
(d) all of them
Click here for Answers
Computer Best MCQ Book in Just Rs.29/- [7000+ Question in English]
https://bharatskills.in/best-computer-mcq-book-for-competitive-exams/
Computer Best MCQ Book in Just Rs.25/- (2100+ Question in Hindi)
https://bharatskills.in/computer-mcq-book-in-hindi-pdf/
HEETSON
Telegram https://t.me/Heetson_Official
WhatsApp Channel
@heetsoniti

More Related Content

PDF
ITI COPA Python MCQ Most Important New Question
PDF
DRDO Previous Year Computer Question (1000 MCQ)
PDF
Database MCQ (DBMS Most Important Question)
PDF
COPA Question Bank MS Excel MCQ with Answers
PDF
UPSSSC Junior Assistant Computer Question (Previous Year Paper MCQ)
PDF
Number System Computer MCQ Questions and Answers
PDF
Computer GK 10000 MCQ PDF Questions for Competitive Exams
PDF
Bharat Skills COPA Question Bank Important MCQ
ITI COPA Python MCQ Most Important New Question
DRDO Previous Year Computer Question (1000 MCQ)
Database MCQ (DBMS Most Important Question)
COPA Question Bank MS Excel MCQ with Answers
UPSSSC Junior Assistant Computer Question (Previous Year Paper MCQ)
Number System Computer MCQ Questions and Answers
Computer GK 10000 MCQ PDF Questions for Competitive Exams
Bharat Skills COPA Question Bank Important MCQ

Similar to Excel VBA MCQ Questions and Answers (Visual Basic) (20)

PDF
MS Excel MCQ Questions and Answers (Microsoft Office)
PDF
Visual Basics for Application
PDF
NIMI COPA Question Bank Mock Test App MCQ
PPTX
IA (Informatics Assistant ) Suchana Sahayak previous exam 2013 Solved Papers ...
PDF
Test Bank for Introduction to Programming Using Visual Basic 10th Edition Sch...
DOCX
Bis 311 final examination answers
PDF
Starting Out with Visual Basic 7th Edition Gaddis Test Bank
PDF
Introduction to Programming Using Visual Basic 10th Edition Schneider Test Bank
DOCX
QUESTION 1What type of items are valid for use in the value list o.docx
PDF
Introduction to Programming Using Visual Basic 10th Edition Schneider Test Bank
PDF
17 A Label controls property allows a label to change si.pdf
PDF
Test Bank for Starting Out With Visual Basic 2012, 6th Edition Gaddis, Irvine
PPTX
Unit 1 introduction to visual basic programming
PDF
Which of the following is not one of the rules cited in class for making e ma...
DOC
one of the rules cited in class for making e-mail more effective Experience T...
PDF
Starting Out with Visual Basic 7th Edition Gaddis Test Bank
PPTX
Excel 2016 VBA PPT Slide Deck - For Basic to Adavance VBA Learning
PDF
Bt0062 fundamentals of it model question paper
PDF
Starting Out with Visual Basic 7th Edition Gaddis Test Bank
PDF
Starting Out with Visual Basic 7th Edition Gaddis Test Bank
MS Excel MCQ Questions and Answers (Microsoft Office)
Visual Basics for Application
NIMI COPA Question Bank Mock Test App MCQ
IA (Informatics Assistant ) Suchana Sahayak previous exam 2013 Solved Papers ...
Test Bank for Introduction to Programming Using Visual Basic 10th Edition Sch...
Bis 311 final examination answers
Starting Out with Visual Basic 7th Edition Gaddis Test Bank
Introduction to Programming Using Visual Basic 10th Edition Schneider Test Bank
QUESTION 1What type of items are valid for use in the value list o.docx
Introduction to Programming Using Visual Basic 10th Edition Schneider Test Bank
17 A Label controls property allows a label to change si.pdf
Test Bank for Starting Out With Visual Basic 2012, 6th Edition Gaddis, Irvine
Unit 1 introduction to visual basic programming
Which of the following is not one of the rules cited in class for making e ma...
one of the rules cited in class for making e-mail more effective Experience T...
Starting Out with Visual Basic 7th Edition Gaddis Test Bank
Excel 2016 VBA PPT Slide Deck - For Basic to Adavance VBA Learning
Bt0062 fundamentals of it model question paper
Starting Out with Visual Basic 7th Edition Gaddis Test Bank
Starting Out with Visual Basic 7th Edition Gaddis Test Bank
Ad

More from SONU HEETSON (20)

PDF
Mechanic Electric Vehicle Question Paper MCQ ITI NIMI EV Question Bank Book Free
PDF
Tool and Die Maker (Dies & Moulds) Question Paper MCQ ITI NIMI Question Bank...
PDF
Surveyor Question Paper MCQ ITI Surveying NIMI Question Bank Book Free
PDF
Surface Ornamentation Techniques (Embroidery) Question Paper MCQ ITI NIMI Que...
PDF
Steno Hindi Question Paper MCQ ITI Question Bank Book Free
PDF
Sheet Metal Worker Question Paper MCQ ITI NIMI Question Bank Book Free
PDF
Plastic Processing Operator Question Paper MCQ ITI NIMI Question Bank Book Free
PDF
Digital Photography MCQ Questions - Photographer Question Paper NIMI MCQ Book...
PDF
Photographer Question Paper MCQ ITI NIMI Question Bank Book Free
PDF
Tractor Mechanic Question Paper MCQ ITI NIMI Question Bank Book Free
PDF
Mechanic Machine Tool Maintenance Question Paper MCQ ITI NIMI Question Bank B...
PDF
Mason Building Constructor Question Paper MCQ ITI NIMI Question Bank Book
PDF
Machinist Grinder Question Paper MCQ ITI NIMI Question Bank Book PDF Free Dow...
PDF
Steno English Question Paper MCQ ITI NIMI Question Bank Book Free
PDF
Dress Making Question Paper ITI NIMI MCQ Book PDF Free Download
PDF
Interior Design and Decoration Question Paper ITI NIMI MCQ Book PDF Free Down...
PDF
Instrument Mechanic Question Paper ITI NIMI MCQ Book Free
PDF
Housekeeping Question Paper ITI NIMI Question Bank MCQ Book Free
PDF
Foundryman Question Paper ITI MCQ Book NIMI Question Bank Free
PDF
Fireman Question Paper ITI NIMI Question Bank MCQ Book Free
Mechanic Electric Vehicle Question Paper MCQ ITI NIMI EV Question Bank Book Free
Tool and Die Maker (Dies & Moulds) Question Paper MCQ ITI NIMI Question Bank...
Surveyor Question Paper MCQ ITI Surveying NIMI Question Bank Book Free
Surface Ornamentation Techniques (Embroidery) Question Paper MCQ ITI NIMI Que...
Steno Hindi Question Paper MCQ ITI Question Bank Book Free
Sheet Metal Worker Question Paper MCQ ITI NIMI Question Bank Book Free
Plastic Processing Operator Question Paper MCQ ITI NIMI Question Bank Book Free
Digital Photography MCQ Questions - Photographer Question Paper NIMI MCQ Book...
Photographer Question Paper MCQ ITI NIMI Question Bank Book Free
Tractor Mechanic Question Paper MCQ ITI NIMI Question Bank Book Free
Mechanic Machine Tool Maintenance Question Paper MCQ ITI NIMI Question Bank B...
Mason Building Constructor Question Paper MCQ ITI NIMI Question Bank Book
Machinist Grinder Question Paper MCQ ITI NIMI Question Bank Book PDF Free Dow...
Steno English Question Paper MCQ ITI NIMI Question Bank Book Free
Dress Making Question Paper ITI NIMI MCQ Book PDF Free Download
Interior Design and Decoration Question Paper ITI NIMI MCQ Book PDF Free Down...
Instrument Mechanic Question Paper ITI NIMI MCQ Book Free
Housekeeping Question Paper ITI NIMI Question Bank MCQ Book Free
Foundryman Question Paper ITI MCQ Book NIMI Question Bank Free
Fireman Question Paper ITI NIMI Question Bank MCQ Book Free
Ad

Recently uploaded (20)

PDF
What if we spent less time fighting change, and more time building what’s rig...
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
Updated Idioms and Phrasal Verbs in English subject
PDF
Anesthesia in Laparoscopic Surgery in India
PPTX
Cell Types and Its function , kingdom of life
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PPTX
History, Philosophy and sociology of education (1).pptx
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
Classroom Observation Tools for Teachers
PPTX
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
Complications of Minimal Access Surgery at WLH
PDF
Computing-Curriculum for Schools in Ghana
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
A systematic review of self-coping strategies used by university students to ...
PDF
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
PPTX
Microbial diseases, their pathogenesis and prophylaxis
What if we spent less time fighting change, and more time building what’s rig...
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Updated Idioms and Phrasal Verbs in English subject
Anesthesia in Laparoscopic Surgery in India
Cell Types and Its function , kingdom of life
Microbial disease of the cardiovascular and lymphatic systems
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
2.FourierTransform-ShortQuestionswithAnswers.pdf
History, Philosophy and sociology of education (1).pptx
Module 4: Burden of Disease Tutorial Slides S2 2025
Classroom Observation Tools for Teachers
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Complications of Minimal Access Surgery at WLH
Computing-Curriculum for Schools in Ghana
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
A systematic review of self-coping strategies used by university students to ...
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
Microbial diseases, their pathogenesis and prophylaxis

Excel VBA MCQ Questions and Answers (Visual Basic)

  • 1. VBA 1. The programming environment which permits coding, compilation, running and debugging from a single window is called .(a) Integrated Development Environment (IDE) (b) Editor (c) Highlighter (d) Compiler Ans. a 2. The IDE of VBA supports since it permits drag and drop approach for design of user interface. (a) Procedural Approach (b) reverse approach (c) Rapid Application Development (RAD) (d) postfix approach Ans. c 3. VBA permits of data from spreadsheets. (a) reading (b) writing (c) both reading and writing (d) neither reading nor writing Ans. c 4. VBA supports ready made user interface components like . (a) UserForm, CommandButton (b) Label, TextBox, ComboBox, ListBox (c) TabStrip, OptionButton, ToggleButton (d) all of them Ans. d 5. VBA supports through class module. (a) Object Oriented Programming System (OOPS) (b) Procedural programming (c) Functional programming (d) property based model Ans. a 6. VBA can be used to automate carried out through MS Excel. (a) data processing (b) graphing (c) accessing cell values (d) all of them Ans. d 7. VBA code is compiled into an intermediate code called code. (a) P-Code (b) MicroSoft Intermediate Code (MSIL) (c) Java Virtual Machine (JVM) code (d) Android Virtual Device (AVD) code Ans. a
  • 2. 8. MS Excel creates to execute VBA code. (a) real time computer (b) mobile computer (c) tablet computer (d) virual machine Ans. d 9. ____is the shortcut to open VBA IDE from MS Excel. (a) Alt+F11 (b) Alt+F8 (c) Ctrl+Break (d) Ctrl+G Ans. a 10._______ is the shortcut to open immediate window in VBA IDE. (a) Alt+F11 (b) Alt+F8 (c) Ctrl+Break (d) Ctrl+G Ans. d 11. _______is the shortcut to open list of macros. (a) Alt+F11 (b) Alt+F8 (c) Ctrl+Break (d) Ctrl+G Ans. b 12. is the shortcut to stop execution of programs in VBA IDE. (a) Alt+F11 (b) Alt+F8 (c) Ctrl+Break (d) Ctrl+G Ans. c 13. ______ is the shortcut to display information relating to selected component in VBA IDE. (a) Ctrl+I (b) Ctrl+J (c) Ctrl+R (d) Ctrl+Shift+I Ans. a 14. ______is the shortcut to properties and methods of a component in VBA IDE. (a) Ctrl+I (b) Ctrl+J (c) Ctrl+R (d) Ctrl+Shift+I Ans. b 15._______ is the shortcut to display project explorer in VBA IDE. (a) Ctrl+I (b) Ctrl+J (c) Ctrl+R (d) Ctrl+Shift+I Ans. c 16. ______is the shortcut to display parameter information for selected element in VBA IDE. (a) Ctrl+I (b) Ctrl+J (c) Ctrl+R (d) Ctrl+Shift+I Ans. d 17. _______is the shortcut to add breakpoint in VBA IDE. (a) F9 (b) F5 (c) F1 (d) F2 Ans. a 18. ______is the shortcut to display object browser in VBA IDE. (a) F9 (b) F5 (c) F1 (d) F2 Ans. d 19. _______is the shortcut to display properties window in VBA IDE. (a) F4 (b) F5 (c) F1 (d) F2 Ans. a
  • 3. 20.__________structure is useful for decision involving three or more options. a) Switch b) Select case c) Function d) List Ans. b 21. VBA has a coding, compilation, running and debugging environment called (a) Integrated Development Environment (IDE) (b) Editor (c) Highlighter (d) Compiler Ans. a 22. In VBA, the function Asc converts given character value to numeric code in______ system. (a) American Standard Code for Information Interchange (ASCII) (b) Double Byte Character Set (DBCS) (c) Unicode (d) none of them Ans. a 23. In VBA, the function AscB converts given character value to numeric code in ______system. (a) American Standard Code for Information Interchange (ASCII) (b) Double Byte Character Set (DBCS) (c) Unicode (d) none of them Ans. b 24. In VBA, the function AscW converts given character value to numeric code in ________system. (a) American Standard Code for Information Interchange (ASCII) (b) Double Byte Character Set (DBCS) (c) Unicode (d) none of them Ans. c 25. In VBA, the function Chr converts given numeric value to character value in _______system. (a) American Standard Code for Information Interchange (ASCII) (b) Double Byte Character Set (DBCS) (c) Unicode (d) none of them Ans. a 26. In VBA, the function ChrB converts given numeric value to character value in ______system. (a) American Standard Code for Information Interchange (ASCII) (b) Double Byte Character Set (DBCS) (c) Unicode (d) none of them Ans. b 27. In VBA, the function ChrW converts given numeric value to character value in _______system. (a) American Standard Code for Information Interchange (ASCII) (b) Double Byte Character Set (DBCS) (c) Unicode System (d) none of them Ans. c
  • 4. 28. In VBA, Cstr function converts any data to_____ type. (a) Integer (b) Double (c) Single (d) String Ans. d 29. CDbl function converts String to _________type. (a) Integer (b) Double (c) Single (d) String Ans. b 30. In VBA, CInt function converts String to _______type. (a) Integer (b) Double (c) Single (d) String Ans. a 31. In VBA, Csng function converts String to _______type. (a) Integer (b) Double (c) Single (d) String Ans. c 32. In VBA, Val function converts String to _______type. (a) number (b) byte (c) Currency (d) Decimal Ans. a 33. In VBA, CByte function converts String to ______type. (a) number (b) byte (c) Currency (d) Decimal Ans. b 34. In VBA, CCur function converts String to _______type. (a) number (b) byte (c) Currency (d) Decimal Ans. c 35. In VBA, CLng function converts String to_______ type. (a) Long (b) byte (c) Currency (d) Decimal Ans. a 36. In VBA, CDec function converts String to_______ type. (a) number (b) byte (c) Currency (d) Decimal Ans. d 37. ______function in VBA creates a custom error message. (a) Format (b) CVErr (c) InputBox (d) MsgBox Ans. b 38. ________function in VBA formats a number according to given text strings containing 0, # and comma (,). (a) Format (b) CVErr (c) InputBox (d) MsgBox Ans. a 39. Boolean data type in VBA has size of ______ (a) 1 byte (b) 2 bytes (c) 3 bytes (d) 4 bytes Ans. b 40. Byte data type in VBA has size of________ (a) 1 byte (b) 2 bytes (c) 3 bytes (d) 4 bytes Ans. a
  • 5. 41. Byte in VBA can store values in the range of________ . (a) 0 to 255 (b) -922,337,203,685,477.5808 to +- 922,337,203,685,477.5807 (c) 01-Jan-100 to 31-Dec-9999 (d) _79; 228; 162; 514; 264; 337; 593; 543; 950; 335or _7:9228162514264337593543950335 Ans. a 42. Currency data type in VBA has size of_________ (a) 2 bytes (b) 3 bytes (c) 4 bytes (d) 8 bytes Ans. d 43. Currency data type in VBA can store valuesin the range of ________ (a) 0 to 255 (b) -922,337,203,685,477.5808 to +-922,337,203,685,477.5807 (c) 01-Jan-100 to 31-Dec-9999 (d) _79; 228; 162; 514; 264; 337; 593; 543; 950; 335or _7:9228162514264337593543950335 Ans. b 44. Date data type in VBA has size of________ (a) 2 bytes (b) 3 bytes (c) 4 bytes (d) 8 bytes Ans. d 45. Date data type in VBA can store valuesin the range of ________. (a) 0 to 255 (b) -922,337,203,685,477.5808 to +-922,337,203,685,477.5807 (c) 01-Jan-100 to 31-Dec-9999 (d) _79; 228; 162; 514; 264; 337; 593; 543; 950; 335or _7:9228162514264337593543950335 Ans. c 46. Decimal data type in VBA has size of________ (a) 14 bytes (b) 8 bytes (c) 4 bytes (d) 2 bytes Ans. a 47. Decimal data type in VBA can store valuesin the range of_________ . (a) 0 to 255 (b) -922,337,203,685,477.5808 to +-922,337,203,685,477.5807 (c) 01-Jan-100 to 31-Dec-9999 (d) _79; 228; 162; 514; 264; 337; 593; 543; 950; 335or _7:9228162514264337593543950335 Ans. d 48. Double data type in VBA has size of_______ (a) 14 bytes (b) 8 bytes (c) 4 bytes (d) 2 bytes Ans. b 49. Double data type in VBA can store valuesin the range of_________ . (a) _1:79769313486232E308 to_4:94065645841247E324 (b) -32,768 to +32,767 (c) -2,147,483,648 to +2,147,483,647 (d) _3:402823E38 to _1:401298E45 Ans. a
  • 6. 50. Integer data type in VBA has size of_________ (a) 14 bytes (b) 8 bytes (c) 4 bytes (d) 2 bytes Ans. d 51. Integer data type in VBA can store valuesin the range of _______. (a) _1:79769313486232E308 to_4:94065645841247E324 (b) -32,768 to +32,767 (c) -2,147,483,648 to +2,147,483,647 (d) _3:402823E38 to _1:401298E45 Ans. b 52. Long data type in VBA has size of_______. (a) 14 bytes (b) 8 bytes (c) 4 bytes (d) 2 bytes Ans. c 53. Long data type in VBA can store valuesin the range of________ . (a) _1:79769313486232E308 to_4:94065645841247E324 (b) -32,768 to +32,767 (c) -2,147,483,648 to +2,147,483,647 (d) _3:402823E38 to _1:401298E45 Ans. c 54. Single data type in VBA has size of_______. (a) 14 bytes (b) 8 bytes (c) 4 bytes (d) 2 bytes Ans. c 55. Single data type in VBA can store valuesin the range of_______ . (a) _1:79769313486232E308 to_4:94065645841247E324 (b) -32,768 to +32,767 (c) -2,147,483,648 to +2,147,483,647 (d) _3:402823E38 to _1:401298E45 Ans. d 56. Object data type in VBA has size of_______. (a) 14 bytes (b) 8 bytes (c) 4 bytes (d) 2 bytes Ans. c 57. String data type in VBA has size of________. (a) 14 bytes (b) 10+length of string bytes (c) 4 bytes (d) 2 bytes Ans. b 58. String data type in VBA can store a maximumof _________characters. (a) 65,400 (b) 32,767 (c) 2,147,483,648 (d) 100 Ans. a
  • 7. 59. Variant data type in VBA has size of_______ (a) 14 bytes (b) 10+length of string bytes (c) 16 or 22+length in bytes (d) 2 bytes Ans. c 60. Variant data type can store_________ . (a) String larger than 65,400 characters in length (b) number larger than Double (c) both a & b (d) none of them Ans. c 61. The_______ arithmetic operator in VBA takes the highest precedence. (a) % (b) + (c) - (d) ^ Ans. d 62. The______ arithmetic operator in VBA calculates power of a number. (a) % (b) + (c) - (d) ^ Ans. d 63. The______ arithmetic operator in VBA has precedence after the ^ operator. (a) % (b) + (c) - (d) / Ans. a 64. The ______arithmetic operator in VBA has precedence after the % operator. (a) * (b) + (c) - (d) / Ans. d 65. The ______arithmetic operator in VBA has precedence after the / operator. (a) * (b) + (c) - (d) none of them Ans. a 66. In the following expression, find out the first operation: 3 * 2 + 5 / 2 + 3 % 2 * 2 ^ 4 (a) 3 * 2 (b) 2 ^ 4 (c) 5 / 2 (d) 3 % 2 Ans. b 67. ______operator in VBA returns true if the left and sides are equal. (a) = (b) <> (c) < (d) > Ans. a 68. _____operator in VBA returns true if the left and sides are not equal. (a) = (b) <> (c) < (d) > Ans. b 69. ______operator in VBA returns true if the left side is less than the right side. (a) = (b) <> (c) < (d) > Ans. c
  • 8. 70. ______operator in VBA returns true if the left side is greater than the right side. (a) = (b) <> (c) < (d) > Ans. d 71. ______operator in VBA returns true if the left side is less than or equal the right side. (a) <= (b) >= (c) < (d) > Ans. a 72. ______operator in VBA returns true if the left side is greater than or equal to the right side. (a) <= (b) >= (c) < (d) > Ans. b 73. What would be the result of the following comparison?:5 < 3 (a) true (b) false (c) neither true nor false (d) both true and false Ans. b 74. What would be the result of the following comparison?:5 > 3 (a) true (b) false (c) neither true nor false (d) both true and false Ans. a 75. What would be the result of the following comparison?:5 = 3 (a) true (b) false (c) neither true nor false (d) both true and false Ans. b 76. What would be the result of the following comparison?:5 <= 3 (a) true (b) false (c) neither true nor false (d) both true and false Ans. b 77. What would be the result of the following comparison?:5 >= 3 (a) true (b) false (c) neither true nor false (d) both true and false Ans. a 78. What would be the result of the following comparison?:5 = 3 (a) true (b) false (c) neither true nor false (d) both true and false Ans. b
  • 9. 79. _____and_____are the two concatenation operators available in VBA. (a) + and & (b) @ and %m (c) * and ! (d) # and $ Ans. a 80. In VBA, using__________ operatorfor concatenation results in addition if Strings have numeric value and concatenationif Strings have alphanumeric value. (a) & (b) $ (c) # (d) + Ans. d 81. In VBA, using _______operator forconcatenation results concatenation of Strings, irrespective of numeric or alphanumericvalue stored in the Strings. (a) & (b) $ (c) # (d) + Ans. a 82. The ____operator in VBA returns true if only one of the 2 comparisons is true. (a) OR (b) AND (c) NOT (d) XOR Ans. d 83. Choose the result of the following VBAexpression:x = "20" & "32" (a) 2032 (b) 52 (c) 3220 (d) "" Ans. a 84. Choose the result of the following VBAexpression:x = "Hi, " + "how are you?" (a) "how are you, Hi?" (b) "Hi: how are you" (c) "Hi, how are you?" (d) "Hi?" Ans. c 85. Choose the result of the following VBAexpression: x = "Hi, " & "how are you?" (a) "how are you, Hi?" (b) "Hi: how are you" (c) "Hi, how are you?" (d) "Hi?" Ans. c 86. The operators in VBA which combine the results of several comparisons are called__operators. (a) logical (b) arithmetical (c) mathematical (d) concatenation Ans. a 87. The _____operator in VBA returns true only if both sides of the operator are true. (a) OR (b) AND (c) NOT (d) XOR Ans. b 88. The______ operator in VBA returns true only if given comparison is false. (a) OR (b) AND (c) NOT (d) XOR Ans. c 89. The expression in VBA (5<3) XOR (4>2) results in_____ . (a) true (b) false (c) neither true nor false (d) both true and false Ans. a 90. The expression in VBA (5>3) XOR (4>2) results in______ . (a) true (b) false (c) neither true nor false (d) both true and false Ans. b
  • 10. 91. The expression in VBA NOT (4>2) results in ______. (a) true (b) false (c) neither true nor false (d) both true and false Ans. b 92. The expression in VBA NOT (4<2) results in______ . (a) true (b) false (c) neither true nor false (d) both true and false Ans. a 93. _______operators in VBA compare the corresponding bits of numbers to arrive a result. (a) logical (b) arithmetical (c) mathematical (d) bitwise Ans. d 94. The _________ operator in VBA returns 1 only if both bits are 1. (a) OR (b) AND (c) NOT (d) XOR Ans. b 95. The ________operator returns 1 if given bit is 0 and returns 0 if given bit is 1. (a) OR (b) AND (c) NOT (d) XOR Ans. c 96. The ________ operator returns 1 if at least one of the bits is 1. (a) OR (b) AND (c) NOT (d) XOR Ans. a 97. The ________operator returns 1 if only one of the two bits is 1 and the other one is 0. (a) OR (b) AND (c) NOT (d) XOR Ans. d 98. The expression in VBA 5 AND 3 (101 AND 11) results in______ . (a) 1 (b) 3 (c) 5 (d) 7 Ans. a 99. The expression in VBA 5 XOR 3 (101 XOR 011) results in _______ . (a) 1 (b) 3 (c) 6 (d) 7 Ans. c 100. _____function in VBA returns positive value of a number, irrespective of whether the input is positive or negative. (a) ABS (b) ATN (c) COS (d) EXP Ans. a 101. ______function in VBA returns the cosine value of given number. (a) ABS (b) ATN (c) COS (d) EXP Ans. c 102. _______function in VBA returns exponential value of given input. (a) ABS (b) ATN (c) COS (d) EXP Ans. d 103. ______function in VBA returns integer part of given input. (a) FIX (b) FORMAT (c) INT (d) LOG Ans. a
  • 11. 104.______ function in VBA returns integer portion of given input. (a) FIX (b) FORMAT (c) INT (d) LOG Ans. c 105. _______function in VBA returns logarithm of given number to specified base. (a) FIX (b) FORMAT (c) INT (d) LOG Ans. d 106. ______ function in VBA returns formatted version of given number (the format being specified by 0 and #). (a) FIX (b) FORMAT (c) INT (d) LOG Ans. b 107._______function in VBA initializes random seed. (a) SIN (b) RND (c) RANDOMIZE (d) SGN Ans. c 108. _______function in VBA returns sine value of given number. (a) SIN (b) RND (c) RANDOMIZE (d) SGN Ans. a 109. _______function in VBA returns a random number. (a) SIN (b) RND (c) RANDOMIZE (d) SGN Ans. b 110. _______function in VBA rounds the given number to the nearest integer value. (a) ROUND (b) SQR (c) TAN (d) SGN Ans. a 111.______function in VBA returns tangent value of given number. (a) ROUND (b) SQR (c) TAN (d) SGN Ans. c 112. ______function in VBA returns square root of given number. (a) ROUND (b) SQR (c) TAN (d) SGN Ans. b 113._______function in VBA returns thenumeric value of given character in theAmerican Standard Code of InformationInterchange (ASCII) system. (a) ASC (b) CHR (c) & (d) INSTR Ans. a 114. ________function in VBA returns concatenatednew string from given Stringvalues. (a) ASC (b) CHR (c) & (d) INSTR Ans. c 115. ________function in VBA returns charactervalue of given numeric value. (a) ASC (b) CHR (c) & (d) INSTR Ans. b
  • 12. 116.______ function in VBA returns locationat which the second string occurs within the first string. (a) ASC (b) CHR (c) & (d) INSTR Ans. d 117. ____function in VBA returns last locationat which the second string occurs within the first string. (a) INSTRREV (b) LCASE (c) LEFT (d) RIGHT Ans. a 118. _______function in VBA returns lowercaseversion of given string. (a) INSTRREV (b) LCASE (c) LEFT (d) RIGHT Ans. b 119. _______ function in VBA returns uppercaseversion of given string. (a) INSTRREV (b) LCASE (c) LEFT (d) UCASE Ans. d 120. ______ function in VBA returns givennumber of characters counted from theleft of the string. (a) INSTRREV (b) LCASE (c) LEFT (d) RIGHT Ans. c 121._____ function in VBA returns givennumber of characters counted from theright of the string. (a) INSTRREV (b) LCASE (c) LEFT (d) RIGHT Ans. d 122. _____function in VBA returns lengthof given string. (a) LEN (b) LTRIM (c) RTRIM (d) TRIM Ans. a 123. ______function in VBA removes whitespaces from the left end of given string. (a) LEN (b) LTRIM (c) RTRIM (d) TRIM Ans. b 124. ______function in VBA removes whitespaces from the right end of given string. (a) LEN (b) LTRIM (c) RTRIM (d) TRIM Ans. c 125. _____function in VBA removes whitespaces from both left and right ends ofgiven string. (a) LEN (b) LTRIM (c) RTRIM (d) TRIM Ans. d 126. ______function in VBA extracts a substringfrom given start character for specified count of characters. (a) MID (b) REPLACE (c) SPACE (d) STR Ans. a 127. _____function in VBA finds givenstring and replaces it with another. (a) MID (b) REPLACE (c) SPACE (d) STR Ans. b
  • 13. 128._____function in VBA returns specified number of spaces. (a) MID (b) REPLACE (c) SPACE (d) STR Ans. c 129. _______function in VBA converts givennumber to string. (a) MID (b) REPLACE (c) SPACE (d) STR Ans. d 130. ______function in VBA compares givenstrings, returns -1 if the first string issmaller than the second string, 0 if both are equal and 1 if the first is greater thanthe second string. (a) STRCOMP (b) STRCONV (c) STRREVERSE (d) VAL Ans. a 131. _____function in VBA converts given string to uppercase, lowercase, propercase, or unicode. (a) STRCOMP (b) STRCONV (c) STRREVERSE (d) VAL Ans. b 132. ______function in VBA reverses given string. (a) STRCOMP (b) STRCONV (c) STRREVERSE (d) VAL Ans. c 133.______function in VBA returns numeric value of string. (a) STRCOMP (b) STRCONV (c) STRREVERSE (d) VAL Ans. d 134. ______function in VBA returns part of a date (YYYY for year, MM for month and DD for day of month). (a) Date (b) DATEADD (c) DATEDIFF (d) DATEPART Ans. d 135. _______function in VBA returns difference between two dates in specified unit (YYYY for years, MM for months and DD for days). (a) Date (b) DATEADD (c) DATEDIFF (d) DATEPART Ans. c 136. _______function in VBA adds given duration to the specified date (YYYY for years, MM for months and DD for days). (a) Date (b) DATEADD (c) DATEDIFF (d) DATEPART Ans. b 137. _______function in VBA converts given day of month, month and year values to date object. (a) DATESERIAL (b) DATEVALUE (c) DAY (d) FORMAT Ans. a 138. ________function in VBA converts a string value to date. (a) DATESERIAL (b) DATEVALUE (c) DAY (d) FORMAT Ans. b 139. _______function in VBA returns day of month from given date. (a) DATESERIAL (b) DATEVALUE (c) DAY (d) FORMAT Ans. c
  • 14. 140.______ function in VBA returns formatted date object based on given string. (a) DATESERIAL (b) DATEVALUE (c) DAY (d) FORMAT Ans. d 141. ______function in VBA returns month number from given date. (a) MONTH (b) MONTHNAME (c) HOUR (d) MINUTE Ans. a 142. ______function in VBA returns name of month from given date. (a) MONTH (b) MONTHNAME (c) HOUR (d) MINUTE Ans. b 143. ______function in VBA returns hour of day for given time. (a) MONTH (b) MONTHNAME (c) HOUR (d) MINUTE Ans. c 144. ______function in VBA returns minute of hour for given time. (a) MONTH (b) MONTHNAME (c) HOUR (d) MINUTE Ans. d 145. ______function in VBA returns year number from given date object. (a) YEAR (b) MONTHNAME (c) HOUR (d) MINUTE Ans. a 146.______ function in VBA converts a string to time object. (a) NOW (b) TIMESERIAL (c) TIMEVALUE (d) WEEKDAY Ans. c 147. ______function in VBA returns day of week. (a) NOW (b) TIMESERIAL (c) TIMEVALUE (d) WEEKDAY Ans. d 148.______function in VBA returns name of the day of week. (a) NOW (b) TIMESERIAL (c) TIMEVALUE (d) WEEKDAYNAME Ans. d 149. Variables which can be accessed using index values (from 0 to given number) are called ____ . (a) Array (b) Integer (c) Double (d) Single Ans. a 150. Arrays can be created by_______ . (a) declaring array with a size (b) declaring array without size but populating it to desired size (c) resizing array using REDIM command (d) all of them Ans. d 151. The following declaration creates an array having_____ number of elements. Dim a(3) (a) 3 values indexed from 0 to 2 (b) 4 values indexed from 0 to 3 (c) 3 values indexed from 1 to 3 (d) 0 values indexed 0 Ans. b
  • 15. 152. From the following VBA code, select the correct statement from given choices: Dim a(1) a(0)=10 a(1)=20 REDIM PRESERVE a(2) a(2)=30 (a) declares an array a with 2 elements (b) assigns 10 and 20 at indices 0 and 1 (c) resizes the array to have 3 elements and assigns 30 to array index 2 (d) all of them Ans. d 153. A matrix can be represented using a _______dimensional array in VBA. (a) 1 (b) 2 (c) 3 (d) 4 Ans. b 154. The following VBA statement declares a _______dimensional array. Dim a(3,4) (a) 1 (b) 2 (c) 3 (d) 4 Ans. b 155. ______ keyword in VBA causes previous elements of array to be kept in the new array. (a) NEW (b) DIM (c) PRESERVE (d) NEXT Ans. c 156.______ function in VBA returns the smallest index for given array. (a) LBOUND (b) UBOUND (c) SPLIT (d) JOIN Ans. a 157. ______function in VBA returns the largest index for given array. (a) LBOUND (b) UBOUND (c) SPLIT (d) JOIN Ans. b 159. _______function in VBA divides a string into an array at the occurrence of specified substring. (a) LBOUND (b) UBOUND (c) SPLIT (d) JOIN Ans. c 160._____ function in VBA joins elements of an array and creates a string with specified separator. (a) LBOUND (b) UBOUND (c) SPLIT (d) JOIN Ans. d 161. ______function in VBA returns elements which fulfill certain search criterion. (a) ISARRAY (b) FILTER (c) ERASE (d) none of them Ans. b 162. _____function in VBA returns true if the argument is an array. (a) ISARRAY (b) FILTER (c) ERASE (d) none of them Ans. a
  • 16. 163. ____function in VBA removes all elements of an array. (a) ISARRAY (b) FILTER (c) ERASE (d) none of them Ans. c 164. ____and_____ are the conditional statements available in VBA. (a) IF ... Then and Select Case (b) For and While (c) Do While and Do Until (d) none of them Ans. a 165. Several successive conditions may be checked using ______statement of IF condition. (a) ElseIf (b) End If (c) Else (d) Then Ans. a 166. In case none of the conditions in an IF ladder is fulfilled, statements in____ block are executed. (a) ElseIf (b) End If (c) Else (d) Then Ans. c 167. In the following VBA code, find out the possible bug/error: Dim x as Integer x=5 If x < 5 End If (a) End If is missing (b) Then keyword is missing at the end of If (c) The condition in If statement is incorrect (d) none of them Ans. b 168. _____condition takes a value and compares it against several Case statements. (a) Case (b) Select Case (c) End Select (d) Case Else Ans. b 169. Select Case condition ends with ______statement. (a) Case (b) Select (c) End Select (d) Case Else Ans. c 170. _____condition is matched if none of the Case conditions of Select Case is matched. (a) Case (b) Select (c) End Select (d) Case Else Ans. d
  • 17. 171. What would be the value of y after the execution of the following VBA code: Dim x, y as Integer x=5 Select Case x Case 0 y = 10 Case 1 y=20 Case 2 y=30 Case Else y=100 End Select (a) 10 (b) 20 (c) 30 (d) 100 Ans. d 172. For statement uses_______ to specify the increment to index value. (a) Step (b) To (c) Next (d) Each Ans. a 173. ______loop in VBA takes each element of an array one by one. (a) For (b) For Each (c) While (d) Do While Ans. b 174. While loop in VBA ends with________ statement. (a) End (b) Loop (c) Next (d) Wend Ans. d 175. Do While statement executes till the given condition is______ . (a) false (b) true (c) both true and false (d) neither true nor false Ans. b 176. Do Until statement executes till the given condition is______ . (a) false (b) true (c) both true and false (d) neither true nor false Ans. a 177. MsgBox function in VBA takes a______ as the first and mandatory parameter. (a) String (b) Integer (c) Double (d) Long Ans. a 178. The second parameter of MsgBox in VBA is _____ to control the buttons of the dialog. (a) Integer (b) Long (c) Single (d) Double Ans. a 179. MsgBoxmay be provided the option ______to display only the OK button. (a) vbYesNoCancel (b) vbAbortRetryIgnore (c) vbOKCancel (d) vbOKOnly Ans. d
  • 18. 180. MsgBoxmay be provided the option______ to display the OK and Cancel buttons. (a) vbYesNoCancel (b) vbAbortRetryIgnore (c) vbOKCancel (d) vbOKOnly Ans. c 181. MsgBoxmay be provided the option_____ to display the Yes, No and Cancel buttons. (a) vbYesNoCancel (b) vbAbortRetryIgnore (c) vbOKCancel (d) vbOKOnly Ans. a 182. MsgBoxmay be provided the option _______to display the Abort, Retry and Ignore buttons. (a) vbYesNoCancel (b) vbAbortRetryIgnore (c) vbOKCancel (d) vbOKOnly Ans. b 183. MsgBoxmay be provided the option_____ to display the Yes and No buttons. (a) vbYesNo (b) vbRetryCancel (c) vbCritical (d) vbQuestion Ans. a 184. MsgBoxmay be provided the option _____to display the Retry and Cancel buttons. (a) vbYesNo (b) vbRetryCancel (c) vbCritical (d) vbQuestion Ans. b 185. MsgBoxmay be provided the option _______to display critical error message. (a) vbYesNo (b) vbRetryCancel (c) vbCritical (d) vbQuestion Ans. c 186. MsgBoxmay be provided the option______ to display a warning query. (a) vbYesNo (b) vbRetryCancel (c) vbCritical (d) vbQuestion Ans. d 187. MsgBoxmay be provided the option _______to display an exclamation message. (a) vbExclamation (b) vbInformation (c) vbDefaultButton1 (d) vbDefaultButton2 Ans. a
  • 19. 188. MsgBoxmay be provided the option______ to display an information message. (a) vbExclamation (b) vbInformation (c) vbDefaultButton1 (d) vbDefaultButton2 Ans. b 189. MsgBoxmay be provided the option_______ to keep the first button as the default button. (a) vbDefaultButton1 (b) vbDefaultButton2 (c) vbDefaultButton3 (d) vbDefaultButton4 Ans. a 190. MsgBoxmay be provided the option_______ to keep the second button as the default button. (a) vbDefaultButton1 (b) vbDefaultButton2 (c) vbDefaultButton3 (d) vbDefaultButton4 Ans. b 191. MsgBoxmay be provided the option_____ to keep the third button as the default button. (a) vbDefaultButton1 (b) vbDefaultButton2 (c) vbDefaultButton3 (d) vbDefaultButton4 Ans. c 192. MsgBoxmay be provided the option______ to keep the fourth button as the default button. (a) vbDefaultButton1 (b) vbDefaultButton2 (c) vbDefaultButton3 (d) vbDefaultButton4 Ans. d 193._____value in MsgBox function of VBA checks whether OK button wasclicked. (a) vbOK (b) VKCancel (c) vbAbort (d) vbRetry Ans. a 194. _____value in MsgBox function of VBA checks whether Cancel button was clicked. (a) vbOK (b) VKCancel (c) vbAbort (d) vbRetry Ans. b 195. _____value in MsgBox function of VBA checks whether Abort button was clicked. (a) vbOK (b) VKCancel (c) vbAbort (d) vbRetry Ans. c 196. ____value in MsgBox function of VBA checks whether Retrybutton was clicked. (a) vbOK (b) VKCancel (c) vbAbort (d) vbRetry Ans. d
  • 20. 197. Input box in VBA can be displayed using______ function. (a) MsgBox (b) InputBox (c) box (d) none of them Ans. b 198. The first parameter of InputBox is ____for the input dialog. (a) prompt message (b) title of dialog (c) both a & b (d) neither a nor b Ans. a 199. The second parameter of InputBox is _______for the input dialog. (a) prompt message (b) title of dialog (c) both a & b (d) neither a nor b Ans. b 200. The return value of a function is assigned to variable named______ . (a) something other than the name of the function (b) exactly matching the name of the function (c) return (d) end Ans. b 201. Unlike subroutines or procedures, function can _____a value. (a) return (b) nullify (c) add (d) subtract Ans. a 202. In a VBA project, inserting a_____ helps to create new function. (a) UserForm (b) Class Module (c) Module (d) none of them Ans. c 203. A subroutine begins with______ keyword. (a) Function (b) End Function (c) return (d) Sub Ans. d 204. A subroutine ends with ______statement. (a) Function (b) End Sub (c) return (d) none of them Ans. b 205. Subroutines are otherwise called________. (a) procedures (b) conditions (c) loops (d) none of them Ans. a 206. Subroutines________return a value. (a) do not (b) do (c) may or may not (d) none of them Ans. a
  • 21. 207. In a VBA project, _____are handled using subroutines. (a) GUI events (b) all computations (c) all variables (d) none of them Ans. a 208. Macro can be recorded using ______icon in the View menu. (a) macro (b) micro (c) Font (d) Paragraph Ans. a 209. A class can be created by inserting________ in a VBA project. (a) UserForm(b) class module (c) module (d) none of them Ans. b 210. Class name in a VBA project can be changed through______ . (a) Name property in properties window (b) UserForm (c) Module (d) none of them Ans. a 211. Class in VBA supports ______ of Object Oriented Programming System. (a) Property (b) Function (c) Subroutine (d) all of them Ans. d 212. VBA supports______ keyword for access control. (a) Private (b) Public (c) both a & b (d) none of them Ans. c 213. A property in VBA can be assigned new value through ______keyword. (a) Set (b) Let (c) Get (d) none of them Ans. b 214. The value of a property can be obtained using _______keyword. (a) Set (b) Let (c) Get (d) none of them Ans. c 215. The variable declared using a new class can be initialized using_____ keyword. (a) Set (b) Let (c) Get (d) none of them Ans. a 216. Find the name of the property created using the following lines of VBA code: Private s as Integer Public Property Let Score(x as Integer) s = x End Property Public Property Get Score() as Integer Score = s End Property (a) s (b) Let (c) Get (d) Score Ans. d
  • 22. 217. GUI supports visual components like CommandButton, Label, TexBox, ComboBox, OptionBox, MultiPage, List, etc. which generate ______on user interaction. (a) events (b) properties (c) functions (d) subroutines Ans. a 218. Events wait like hidden armoury until _______ aoccurs. (a) packing (b) trigger (c) cleaning (d) deletion Ans. b 219. Events fired from components are handled by______ linked to those events. (a) functions (b) properties (c) variables (d) subroutines Ans. d 220. A large window which supports placement of other components on its surface is called _____. (a) CommandButton (b) Label (c) UserForm (d) TextBox Ans. c 221. The______ member supports Run from Run menu of VBA IDE. (a) CommandButton (b) Label (c) UserForm (d) TextBox Ans. c 222. UserForm supports ______for control of its window. (a) maximize (b) iconify (c) close/ exit (d) all of them Ans. d 223. ______ is suitable to start computation after collecting required input data for processing. (a) CommandButton (b) Label (c) UserForm (d) TextBox Ans. a 224. _____ is suitable to display a prompt message to collect input data. (a) CommandButton (b) Label (c) UserForm (d) TextBox Ans. b 225. _______ is creates an input box with a tick mark. (a) CheckBox (b) OptionBox (c) List (d) ToggleButton Ans. a 226. ______is creates a box with a circular dot, which can be receives tick only if all related boxes become switched o_. (a) CheckBox (b) OptionBox (c) List (d) ToggleButton Ans. b 227.______ is creates a box with a triangular button, clicking which displays a number of input values. (a) ComboBox (b) OptionBox (c) List (d) ToggleButton Ans. a 228. ______ is creates a box with a scrollable list containing a number of input values. (a) ComboBox (b) OptionBox (c) List (d) ToggleButton Ans. c
  • 23. 229. _____is creates a control which remains pressed or released after each click. (a) ComboBox (b) OptionBox (c) List (d) ToggleButton Ans. d 230.______ is creates controls help to create sets of components which can be brought to view by clicking a button at top. (a) TabStrip (b) MultiPage (c) both a & b (d) neither a nor b Ans. c 231. _______control can be used to set numeric values in other components. (a) SpinBox (b) Image (c) RefEdit (d) Label Ans. a 232. ______control can be used to display an image. (a) SpinBox (b) Image (c) RefEdit (d) Label Ans. b 233. ______control can be used to select a range from the spreadsheet when the VBA program runs. (a) SpinBox (b) Image (c) RefEdit (d) Label Ans. c 234. Properties window can be accessed by placing a_____ after the name of a variable. (a) dot (.) (b) $ (c) # (d) ^ Ans. a 235. When a User-Form gets ready, _____event is fired. (a) Activate (b) BeforeDragOver (c) BeforeDropOrPaste (d) Click Ans. a 236. When content is about to be dragged over a VBA control, it gets____ event. (a) Activate (b) BeforeDragOver (c) BeforeDropOrPaste (d) Click Ans. b 237. When some content is about to be droped or pasted on a VBA control, it gets ______event. (a) Activate (b) BeforeDragOver (c) BeforeDropOrPaste (d) Click Ans. c 238. When a VBA control is clicked, it generates ______event. (a) Activate (b) BeforeDragOver (c) BeforeDropOrPaste (d) Click Ans. d 239. When a VBA control is double clicked, it generates _____event. (a) DblClick (b) Deactivate (c) Error (d) Click Ans. a
  • 24. 240. When a VBA control is deactivated, it generates______ event. (a) DblClick (b) Deactivate (c) Error (d) Click Ans. b 241. When a VBA control is encounters some error, it generates_____ event. (a) DblClick (b) Deactivate (c) Error (d) Click Ans. c 242. When a VBA control is initilized, it generates _____event. (a) Initialize (b) KeyDown (c) KeyPress (d) KeyUp Ans. a 243. When a key in the keyboard is pressed with focus on a VBA control, it generates _____event. (a) Initialize (b) KeyDown` (c) KeyPress (d) KeyUp Ans. c 244. When a key in the keyboard is pushed down with focus on a VBA control, it generates _____ event. (a) Initialize (b) KeyDown (c) KeyPress (d) KeyUp Ans. b 245. When a key in the keyboard is released with focus on a VBA control, it generates _____event. (a) Initialize (b) KeyDown (c) KeyPress (d) KeyUp Ans. d 246. When mouse button is pushed down on a VBA component, ______event is generated. (a) MouseDown (b) MouseMove (c) MouseUp (d) QueryClose Ans. a 247. When mouse moves over a VBA component, _______event is generated. (a) MouseDown (b) MouseMove (c) MouseUp (d) QueryClose Ans. b 248. When mouse button is released after clicking a VBA component, ______event is generated. (a) MouseDown (b) MouseMove (c) MouseUp (d) QueryClose Ans. c 249. When query closes, the UserForm in VBA_______ receives event. (a) MouseDown (b) MouseMove (c) MouseUp (d) QueryClose Ans. d 250. A set of Windows components, each one created for specific works related to content downloaded from the World Wide Web is called______ controls. (a) ActiveX (b) X-Window (c) Visual (d) Spreadsheet Ans. a 251. ADODB Connection object may be initialized using ______statement. (a) Dim conn as New ADODB.Connection (b) Dim rs as New ADODB.RecordSet (c) both a & b (d) neither a nor b Ans. a
  • 25. 252. ADODB RecordSet object may be initialized using ______statement. (a) Dim conn as New ADODB.Connection (b) Dim rs as New ADODB.RecordSet (c) both a & b (d) neither a nor b Ans. b 253. ________ method of ADODC connection opens a database connection. (a) Open (b) Close (c) Make (d) Query Ans. a 254. In a query performed on data contained in Excel spreadsheet (say Sheet1), table name should be replaced by_______ name. (a) [Sheet1&] (b) [Sheet1$] (c) [Sheet1#] (d) [Sheet1%] Ans. b 255. The IDE of VBA provides______ to indicate errors immediately on typing. (a) coloring (b) popup (c) both a & b (d) neither a nor b Ans. c 256. A breakpoint may be inserted using_______. (a) a click on the margin to the left of a line (b) pressing F9 when cursor is in the line (c) both a & b (d) neither a nor b Ans. c 257. When a runtime error occurs, choose ______from the dialog to correct the program. (a) End (b) Debug (c) Stop (d) Continue Ans. b 258. After program stops due to error or breakpoint, hovering mouse over a variable _______. (a) ignores the variable (b) deletes the variable (c) displays the value of the variable (d) resets the variable Ans. c 259. Using a variable on the right side of computation expression without assigning any value to the variable is may result in________. (a) junk result (b) crashing of program (c) both a & b (d) neither a nor b Ans. c 260. After program stops due to error or breakpoint, trial code lines may be entered in______ to see the result of changes on the program. (a) Immediate Window (b) Properties Window (c) Code Window (d) Project Explorer Ans. a
  • 26. 261. Which VBA built in function returns location at the second string occurs within the first string? A) Mid() B) Chr() C)ASC() D) Instr() Ans. d 262. Which keyword is used to declare the variables in project scope? A Static B Private C Public D Protect Ans. c 263. In VBA, How many types of access specifiers available in VBA? A 2 B 3 C 4 D 6 Ans. a 264. Which type of variable cannot be declared within a procedure in VBA? A Project scope B Local scope C Global scope D Module scope Ans. d 265. Which variable recognized only within the procedure in which it is declared? A Local scope B Module scope C Global scope D Project scope Ans. a 266. How many levels of variable scope available in VBA? A 2 B 3 C 4 D 7 Ans. c 267. 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 Ans. c 268. 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() Ans. b 269. 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() Ans. a 270. Which color of dot indicate the breakpoint in VBA? A Grey B Yellow C Maroon D Red Ans. d 271. Which shortcut key is used to set the properties of form while designing? A F4 B Ctrl + F4 C Alt + F4 D Shift + F4 Ans. a 272. Which shortcut key is used to open code window in VBA? A F7 B Alt + F7 C Ctrl + F7 D Shift + F7 Ans. a
  • 27. 273. 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 Ans. b 274. Which character is to be suffixed for long data type in VBA? A & B ! C # D @ Ans. a 275. How many numeric data types available in Excel VBA? A 4 B 5 C 7 D 8 Ans. c 276. What is the another name for keywords in VBA? A Literals B Variables C User defined words D Reserved words Ans. d 277. Which key word is used to declare the variable in VBA? A Sub B Declare C Dim D AS Ans. c 278. Which entitie hold data in VBA? A Literals B Constants C Keywords D Variables Ans. d 279. Which worksheet method is used to copy a sheet to another location in the workbook? A Activate B Copy C Save AS D Select Ans. b 280. Which VBA worksheet property return or sets a string value that represents the object name? A Name B Index C Range D Cells Ans. a 281. Which method displays the data form associated with the worksheet in VBA? A Copy B Printout C Show Data Form D Select Ans. c 282. Which VBA property returns a range object that represents all the cells on the worksheet? A Cells B Rows C Index D Name Ans. a 283. Which object is member of the workbook? A Sheets B Workbook C Worksheet D Range Ans. c 284. Which type of work book method cannot be modified in VBA? A Close B Save C Save AS D Protect Ans. d 285. 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 Ans. a
  • 28. 286. 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 Ans. c 287. Which button has three states in VBA? A Option button B Spin button C Push button D Command button Ans. a 289. 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 Ans. b 290. Where does Excel come in object hierarchy of VBA? A Range object B Workbook object C Worksheet object D Application object Ans. d 291. Which shortcut key is used to open project explorer window in VBA? A Ctrl + R B Ctrl + P C Ctrl + W D Ctrl + E Ans. a 292. 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 Ans. b 293. Which shortcut key is used to step into line - by - line execution in VBA? A F2 B F4 C F5 D F8 Ans. d 294. What is called the set of commands bundled together under one name? A Properties B Macros C Procedures D Events Ans. b 295. What is called the set of statement that are executed under one name? A Macros B Properties C Procedures D Events Ans. c 296. Which one is attributes of an object in VBA? A Procedures B Events C Macros D Properties Ans. d 297. What is called double clicking an object in VBA? A Events B Macros C Procedures D Methods Ans. a 298. Which is used to type / edit the programming code in VBA? A Form window B Properties window C Immediate window D Visual basic editor Ans. d
  • 29. 299. Which simplifies the work to be eliminating or rewriting the code in VBA? A Class B Object C Macros D Functions Ans. c 300. Which type of variable can be accessed or used by subroutines outside the modules in VBA? A Static B Private C Protect D Public Ans. d 301.Where there is no difference between dim and private in VBA? A Local scope B Module scope C Global scope D Project scope Ans. b 302.Which method is used to pass the reference to the arguments? A Ref B Val C Reference D By Ref Ans. d 303.Which function is used to check whether the given input is numeric or Not in VBA? A Numeric() B Isnumber() C Isnumeric() D Isnum() Ans. c 304.Which function returns specified part of a given date in VBA? A Day() B Datevalue() C Datediff() D Datepart() Ans. d 305.What is the return type of CSng function in VBA? A Boolean B Variant C Single D String Ans. c 306.Which is used to repeats the same steps in case of frequency needed actions in VBA? A Class B Object C Functions D Macros Ans. d 307.Which function returns the integer portion of a number in VBA? A Int() B Format() C Abs() D Sign() Ans. a 308.Which mathematical function generates a random number in VBA? A Random() B Rnd() C Rand() D Round() Ans. b 309.Which operators are concatenation operator in VBA? A + and - B & and - C & and + D & and * Ans. c 310.Which type of words cannot use for any other purpose in VBA? A Literals B Keywords C Constants D Variables Ans. b 311.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 Ans. d
  • 30. 312.Which box has three states in VBA? A List box B Combo box C Check box D Group box Ans. c 313.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 Ans. d 314.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 Ans. a 315.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 Ans. b 316.Which shortcut key is used to open the immediate window? A Ctrl + G B Ctrl + L C Alt + G D Alt + L Ans. a 317.What is the another name trigger for an action in VBA? A Methods B Modules C Events D Macros Ans. c 318.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 Ans. c 319.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 Ans. b 320.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 Ans. a 321.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 Ans. b 322.What will be the output for the following VBA code? Debug.printDateDiff(“yyyy”,”1/12/2016”,”31/1/2017”) A 0 B 1 C 11 D 30 Ans. b
  • 31. 323.What will be the output of the following VBA code? Sub test() x = “institue” Debug.printFormat(x,”>”) End sub A Institute B institute C INSTITUTE D instiTUTE Ans. c 324.What will be the output of the following VBA code? Sub test() a = “ Computer operator” Debug.Printleft(a,10) End sub AOperator B Computer o C Computer D Computer operator Ans. b 325. Macros must be saved in Excel workbook with this extension. a) .xlsx b) .htm c) .xlsm d) .vba Ans. c 326. You can check a workbook’s macro security setting in : a) The backstage view b) The trust center c) The excel options window d) Review tab Ans. b 327. The security warning bar does not open when you open a workbook with macros if you choose: a) open special b) Enable all macros c) edit anyway d) Trust this document Ans. b 328. Instead of typing the code or instructions in a macro program, you: a) Record it b) Insert it c) copy it d) import it Ans. a 329. To activate a file in a personal macro workbook, you must first: a) save it b) Record a practice macro c) import your macros d) Add a VBA command Ans. b 330. A single workbook is called an object while more than one workbooks are called: a) a collection b) a gallery c) a code d) a volume. Ans. a 331. In visual basic, each line preceded by an apostrophe and shown in green is a: a) Macro b) Tag c) Sub d) Comment Ans. d 332. You can tell when an excel template is macro- enabled by looking at its extension. a) Extension b) Name c) Tabs d) Layout Ans. a 333. To run a macro that was recorded with relative reference, you must first: a) save it b) select it c) enable it d) activate a cell Ans. d
  • 32. 334. When you create a workbook from an excel macro-enabled template, you must first click: a) Open normally b) Enable content c) Edit anyway d) Open in safe mode Ans. b 335. To run a macro with a single click, assign a: a) Button b) Shortcut c) Key code d) Special character Ans. a 336. To open the visual basic editor with a keystroke, press: a) Alt+0 b) Windows c) Shift + enter d) F11 Ans. d 337. You can find a button which toggles between Record Macro and Stop Recording in the : a) Backstage view b) Macro view c) Status bar d) View menu Ans. c 338. ______is used for finding out about objects, properties and methods. a) Form layout window b) code editor window c) Object browse d) None of these Ans. c 339. ______function is used to return a copy of a string without leading spaces. a) Rtrim b) Ltrim c) Trim d) All of these Ans. b 340. The variable that does not change the value during execution of program is______ a) Numeric b) String c) Constant d) None of these Ans. c 341. ______is a method which moves the focus to the specified control or form. a) Setfocus b) Lostfocus c) Gotfocus d) None of these Ans. a 342. The function procedures are _____by default. a) Public b) Private c) Protected d) None of these Ans. a 343. ______is a data type that can be used to declare a text of maximum 10 million characters. a) Data b) Ulog c) Numeric d) String Ans. d 344. Variable are named storage locations in memory, the value of which does not change during program______ a) debug b) design c) execution d) All of the above Ans. c 345. The default property for a text box control is ______ a) text b) enable c) multiline d) password char Ans. a 346. _____ is a collection of files. a) class b) group c) project d) All of these Ans. c
  • 33. 347. The method, which loads the form into memory and displays it on screen a) Load b) Show c) Display d) All of these Ans. b 348. The code in an application can be broken into logical components by_____ process. a) Modular b) Procedural c) partitioning d) none of these Ans. c 349. The window in which the individual documents are displayed is called_____ window. a) main b) child c) parent d) Root Ans. b 350. A ______ variable is one that is declared inside a procedure. a) global b) local c) external d) none of these Ans. b 351. ______ control executes the timer events at specified intervals of time. a) clock B) frame c) timer d) digital Ans. c 352. A _____ control in visual basic is used to create applications that present information in rows and columns. a) MSGridLine b) MSLineGrid c) MSGridFlex d) MSFlexGrid Ans. d 353. ______ cannot be declared in a form or class module. a) Static constants b) Private constants c) Public constants d) None of these Ans. c 354. ______ do not return a value. a) Sub procedure b) Function procedure c) property procedures d) all of these Ans. a 355. The default datatype for VB is ____ a) integer b) Decimal c) Variant d) String Ans. c 356. ______ is a build in function to return lower bound of an array. a) Lbound() b) LRbound() c) Lowbound() d) None of these Ans. a 357. The _____ allows direct exit from a For loop, Do loop, Sub procedure, or Function procedure. a) Break b) Exit c) Exit for d) Exit Do Ans. b 358. ______ displays current directory with any subdirectories and allows the used to change directory. a) FileListBox b) DirListBox c) DriveListBox d) All of these Ans. b 359. Extension of Active X designers ______ a) .dsr b) .axd c) .adx d) None of these
  • 34. Ans. a 360. ______ statement enables us to trap runtime error. a) Error b) On Error c) On runtime Error d) All of these Ans. b 361. Frame control acts as a _____ a) Event b) Method c) Class d) container Ans. d 362. Form_MouseDown() procedure is executed when any mouse button is clicked in a free area of the_____. a) Form b) window c) screen d) none of these Ans. a 363. ____ method removes a dialog box from view. a) Enabled b) Disable c) Hide d) Display Ans. c 364. The____ is a tool used for both the input and output purpose. a) Label b) text box c) combo box d) command button Ans. b 365. ____method is used to clear the contents of MSHFlexGrid control. a) Clr b) Cls c) Removeltem d) Clear Ans. d 366. The _______ property is used in VB for maximum form at run time. a) caption b) window resize c) window status d) none of these Ans. c 367. ______ is property is used to hide the content in textbox with some symbols. a) Name b) Caption c) Hidden d) Password char Ans. d 368. ______ method is used to retrieve the stored text from the clipboard. a) input b) Gettext c) Addtext d) Settext Ans. b 369. _______ control displays current directory with any sub directories and allows the user to change directly. a) File list box b) Drive list box c) Directory list box d) All of these Ans. c 370. ____ control is used to represent the items in a hierarchical manner. a) Tree view b) Grid view c) Progress bar d) None of these Ans. a 371. Which is not a property of the common control class? a) show b) font c) BackColor d) ForeColor Ans. a 372. Which symbol creates an access key in the text of a menu item? a) @ b) & c) $ d) #
  • 35. Ans. b 373. When the form Is first referenced in any manner by program, the triggered event is… a) Load b) Activate c) Initialize d) None of these Ans. c 374. The properties window plays an important role in the development of visual basic applications. It is mainly used a) To change how objects look and feel b) When opening programs stored on a hard drive c) To allow the developer to graphically design program components d) To set program related options like program Name, Program location, etc Ans. a 375. What is the different between iserror and iserr? a) Iserr excludes #n/A and returns the value b) both are same c) Iserror excludes #n/A and returns the value d) Iserr returns when the value is #value Ans. a 376. VBA is: a) a Microsoft programming language used to extend excel functions b) a statistical tool developed by Microsoft for financial analysts c) an open-source programming environment d) a Microsoft programming environment that replaces Excel Ans. a 377. One or more option button controls can be selected from _____ choices. A. multiple. B. single. C. dual. D. parallel. ANSWER: A 378. _____ bar contains a set of tools to provide controls in the Form. A. Status. B. Tool C. Menu. D. Progress. ANSWER: C 379. Debug window is the same as ____ window. A. procedure. B. object. C. form. D. code. ANSWER: D 380. Code window consists of a ______ box and procedure list box. A. object. B. event. C. tool. D. message. ANSWER: A 381. The ____ statement checks in the module for usage of any undeclared variables and reports an error to the user. A. looping. B. iteration. C. dim. D. external. ANSWER: C 382. Dynamic arrays can be declared when the user may not know the _____of the array at design time. A. exact column. B. exact variable. C. exact value. D. exact size. ANSWER: D
  • 36. 383. Variables are named storage locations in memory, the value of which does not change during program______. A. design. B. execution. C. debug. D. modification. ANSWER: B 384. Variables of different data types when combined as a single variable to hold several related information is called as ______ data types. A. numeric. B. user defined. C. string. D. byte. ANSWER: B 385. ____box provides a set of choices to the user. A. List. B. Command. C. Combo. D. Text. ANSWER: A 386. All the controls in an array will have the same _____. A. Value. B. properties. C. address. D. location ANSWER: B 387. The _____property in Visual basic is common for many a tools. A. location. B. place. C. window status. D. name. ANSWER: D 388. Option button can be grouped in a ______control. A. label. B. text box. C. frame. D. check box. ANSWER: C 389. A _____ bar appears in the top of the screen. A. title. B. menu. C. tool. D. debug. ANSWER: A 390. Form_Mouse Down ( ) procedure is executed when any mouse button is clicked in a free area of the ______. A. window. B. form. C. screen. D. property. ANSWER: B 391. _____ is a tool used in visual basic to draw rectangle in the form. A. Textbox. B. Option button. C. Command button. D. Shape. ANSWER: D 392. In visual basic ______ is the extension to represent project file. A. .frm. B. .vbp. C. .cls. D. .txt. ANSWER: B 393. In default ____ numbers of tools exist in toolbox. A. 20. B. 15. C. 10. D. 8. ANSWER: A 394. _____ method removes a dialog box from view. A. Display. B. Active. C. Hide. D. Enabled.
  • 37. ANSWER: C 395. The ______property of a form automatically sizes the picture loaded to it. A. auto size. B. default. C. size. D. height. ANSWER: A 396. While entering a new project ______ option to be select from the dialog box. A. open exe. B. standard exe. C. activex exe. D. activexdll . ANSWER: B 397. The ______control used to insert image to the form. A. text box. B. shape. C. option. D. picture. ANSWER: D 398. The Line method can be used to draw ______ shape in VB. A. rectangle. B. circle. C. ellipse D. oval ANSWER: A 399. There can be only ____MDI form in an application. A. four. B. two. C. one. D. zero. ANSWER: C 400. In Visual basic more than one child _____ is allowed to add in project. A. form. B. window. C. property. D. codings. ANSWER: A 401. A function begins with ______keyword. (a) Function (b) End Function (c) return (d) none of them Ans. a 402. A function ends with_____ statement. (a) Function (b) End Function (c) return (d) none of them Ans. b 403. A piece of code automatically generated by an MS Office program based on the actions of user is called_____. (a) function (b) subroutine (c) macro (d) micro Ans. c 404. _______is suitable to collect text input from the user. (a) CommandButton (b) Label (c) UserForm (d) TextBox Ans. d 405. ADODC stands for______ . (a) ActiveX Device Object Data Control (b) Anti-Data Object Data Control (c) ActiveX Data Object Data Control (d) ActiveX Double Object Data Control Ans. c 406. ADODB stands for______. (a) ActiveX Device Object Data Base (b) Anti-Data Object Data Base (c) ActiveX Data Object Data Base (d) ActiveX Double Object Data Base
  • 38. Ans. c 407. What is the full form of UDF in VBA? A User Data Functions B User Defined Functions C Undefined Functions D Used Data Functions Ans. b 408. Which of the following is logical operator in VBA? A + B - C * D And Ans. d 409. Which is used to create user interface forms? A C B VBA C HTML D Javascript Ans. b 410. What is the alternate name of Bugs? A Errors B Keywords C Variables D Constants Ans. a 411. The first key in a macro shortcut is always: a) shift b) ctrl c) alt d) Equal sign (=) Ans. b 412. Visual basic is a tool that allows you to develop application in______ a) Real time b) Graphical user interface c) character user interface d) None Ans. b 413. In visual basic, a variable name cannot be more than ______ characters. a) 255 b) 300 c) 355 d) 400 Ans. a 414. MDI stands for_______. a) Multiple document interface b) Multiple design interface c) Manipulated document interface d) menu design interface Ans. a 415. In visual basic _____ types of scroll bars available in visual basic. A. two. B. three. C. four. D. five. ANSWER: A 1. VBA stands for_________ a) video basic application b) visual basic application c) virtual basic application d) video basic 2. In VBA ________ is a place to store a piece of information. a) design view b) Coding view c) Compartment d) Edit menu
  • 39. 3. IDE stands for . (a) Internal Development Environment (b) Integrated Design Environment (c) Integrated Development Environment (d) Integrated Drafting Environment 4. RAD in the design applications stands for (a) Ready Application Development (b) Rapid Application Development (c) Real Application Development (d) Rapid Analysis Development 5. GUI stands for . (a) General User Interface (b) Graphical User Interaction (c) Graphical User Interface (d) Graphical Unified Interface 6. MS Office records macros in language. (a) VBA (b) C++ (c) C# (d) Java 7. Excel file having VBA code is saved using the extension . (a) .xlsx (b) .xlsm (c) .xlst d) .xls 8. Comment in VBA begins with character and continues till the end of that line. (a) & (b) " (c) ' (d) / 9. Characters should not be used in VBA variable names. (a) ' ', . (b) @, & (c) $, # (d) all of them 10._______ is the shortcut to display help in VBA IDE. (a) F9 (b) F5 (c) F1 (d) F2 11. ______ is the shortcut to run a program in VBA IDE. (a) F9 (b) F5 (c) F1 (d) F2 12. _______function in VBA displays a message. (a) Format (b) CVErr (c) InputBox (d) MsgBox 13. _______function in VBA displays an input box. (a) Format (b) CVErr (c) InputBox (d) MsgBox 14. _______data type in VBA stores true or false values. (a) Boolean (b) Integer (c) Byte (d) Long
  • 40. 15. Choose the result of the following VBA expression: x = "20" + "32" (a) 2032 (b) 52 (c) 3220 (d) "" 16. The______ operator in VBA returns true if atleast one of the 2 expressions is true. (a) OR (b) AND (c) NOT (d) XOR 17. ______function in VBA returns today's date. (a) Date (b) DATEADD (c) DATEDIFF (d) DATEPART 18. _____function in VBA returns current time. (a) NOW (b) TIMESERIAL (c) TIMEVALUE (d) WEEKDAY 19. IF condition in VBA ends with _______ statement. (a) ElseIf (b) End If (c) Else (d) Then 20. _____ is the loop available in VBA. (a) For and While (b) Do While and Do Until (c) For Each (d) all of them Click here for Answers Computer Best MCQ Book in Just Rs.29/- [7000+ Question in English] https://bharatskills.in/best-computer-mcq-book-for-competitive-exams/ Computer Best MCQ Book in Just Rs.25/- (2100+ Question in Hindi) https://bharatskills.in/computer-mcq-book-in-hindi-pdf/ HEETSON Telegram https://t.me/Heetson_Official WhatsApp Channel @heetsoniti