1. What does VBA mean?
2. Using the Select Case construct is ideal when:
3. To obtain the value of the number of characters used in a textbox field on a form, which snippet of VBA code would you use?
4. How do you figure out the number of items in a collection?
5. Correct this statement to start a 5-iteration loop: For x = 1 to 10 Step -2
6. To save a VBA project with an Excel workbook, the workbook must be saved as what type of file?
7. Which of the following do not work on Excel on Mac
8. What is difference between a sub routine and a function.
9. What is a macro used for?
10. What does VBA stand for
11. Which of the following snippets of VBA code is not a loop?
12. You can use VBA to connect to a database in SQL Server using:
13. To comment a block of code, you must first:
14. How do you declare the variable myvar as an integer?
15. The 'not equal to' operator is:
16. Which of the following would you begin a comment line with?
17. On July 4, 2013, What will be displayed in the message box from the following statement: MsgBox(Format(Now,"mm-dd-yyyy"))
18. To force all variables is a VBA project to be declared, which must be stated in a module?
19. True or False? It is possible to name a Sub with a string containing a space.
20. True or False? Commenting at the end of a line of code is permissible.
21. To continue to run code even if a line of code causes an error, choose the VBA code to continue to the next line of code.
22. What do you need to select to set the developer mode?
23. Which of the following is not a VBA data type?
24. The tab order in a user form:
25. You've created a user form named 'Entry_Form'. To make the user form appear, use which of the following statements?
26. The shortcut keystroke to open the VBA IDE is:
27. Choose the VBA code that will allow you to obtain information about an error.
28. Is it possible to create an array with the lowerbound being two?
29. Which of these is not a Visual Basic object?
30. Declaring a public variable allows the user to..
31. What does a VBA macro consist of?
32. The RowSource property of a Combo Box control allows the user to:
33. Which worksheet event can be used to run a procedure upon deleting the contents of a cell?
34. In the statement x = "4" + "5"', x = ?
35. What is the shortcut keystroke to debug VBA code one line at a time?
36. The way to pass the latest values of variables between functions and procedures is identified as:
37. Which of the following VBA windows shows the code of the active object?
38. Which of these statements will start a loop of exactly 20 iterations?
39. Dim a,b as integer What is the type of a?
40. The statement 'Dim a, b as Single' declares the variables a and b as what variable types?
41. If you want to create a definition for a custom object in VBA, which of the following would be the best choice to insert into your project?
42. What is the property of a cell that allows you to set the font color of the contents?
43. Which of the following functions do not perform a calculation
44. What does the DoEvents do?
45. Choose the VBA code that switches control from the application to the OS.
46. Which of the following actions will NOT cause a macro to run in Excel?
47. What is the difference between activating and initializing a user form?
48. To change a comment in cell A1, which will do the job?
49. Combine into one line: If x > 5 Then y = x - 5 End If
50. To change the text displayed in a label on a form, choose the VBA code that will allow you to update the property.
51. Which code will allow user to edit a password protected worksheet.
52. When stepping through code as a way to see how the values in variables change, use the:
53. Choose the VBA code that will allow you to verify that an Item exists in the Dictionary object Dict1.
54. What value is x holding after this statement is executed: x = Left("Apple",3) & Right("People", 3)
55. What will Format(2.36, “#0.0”) output?
56. 'Do While x < 5' is equivalent to:
57. Month(#12/25/02#) will output?
58. You have written a function called Switch requiring the input string parameters a and b. The function will concatenate the values assigned to b and a, in that order. What line of code is needed within the function?
59. The library to make ADODB.connection work.
60. Under which menu option in the VBA IDE can you password protect a VBA project?
61. In the next statement: "Dim bValue as Boolean" What will be the default value for "bValue" variable?
62. Which is the correct way to use formulas on Excel in VBA code
63. What is the right syntax to raise your custom error?
64. What is the difference between these commands CreateObject("Word.Application") GetObject(, "Word.Application")
65. What is BOF?
66. As an alternative to the If.. Then.. ElseIf..Else condition, how would you format the Choose function with variable x1 and the following conditions: "Red", "Blue", "Yellow", "White"
67. Choose the VBA code to execute a Word MailMerge in Access
68. When integrating Excel, which VBA code will allow you transfer data from recordset xRec in Access directly onto a spreadsheet (xlws) in Excel.
69. With out creating a reference to the Microsoft Scripting Runtime for the DLL to create a Dictionary object, choose the VBA code to allow you to do so.
70. Choose the VBA code to remove data from Row 2 in a multiple column listbox.
71. Which of the following snippets of VBA code will allow you to return the first array index in the array xItems?
72. True or False? An 'If-Then' statement must always be paired with an 'End If'.
73. In Access, which VBA code will allow you to suppress alerts when deleting records from a table.
74. What stores Excel data?
75. Choose the VBA code used to add a new record to the recordset xRec.
76. Is it possible to expand storage space for dynamic Array variables with two or more dimensions, keeping the existing data?
77. When integrating Excel, instead of adding a reference, which VBA code would you use to open Microsoft Excel.
78. Which Will Not display VBA code?
79. Choose the VBA code that you would use to obtain the user login on a computer using a Windows operating system.
80. The application property that will assign a shortcut key to run a macro is:
81. You want to dump the values stored in a 12-element array named Rates into the cell range A1:A12. How can you get that done?
82. Where you can create you custom events?
83. Which function will allow you to convert a value to number?
84. You want to count how many records for a given customer based on CustomerID which is of field type short text in table tblCustomer. The customer id we want the count for is 123-AC. We are using the domain aggregate function DCount and assign it to an integer variable intC what is the correct syntax.
85. Which is NOT a method of the Workspace object:
86. What will Format(“A123”, “&&&&&&”) output?
87. When you have added a new linked table using VBA code and it does not appear in Navigation Pane that displays the list of tables, forms, macros, and queries in the database. Which VBA code would you use to update the list of database objects displayed in the Navigation Pane.
88. Choose the VBA code that you would use to call a public function named VBAFunction from a form called FormA while passing a variant x1 in the module of FormB form.
89. The ____________ allow(s) for multiple controls in a user form, to execute the same sub.
90. Which statement will assign a random integer from 1 to 5 to the variable x?
91. Without using SQL, choose the VBA code to allow you to delete the table Employees.
92. Choose the VBA code to filter the rowsource in a multiple column listbox that will allow you to filter the records listed using the LIKE statement and the variable xCompany.
93. Choose the VBA code that will allow you to check to see if the form MainMenufrm is loaded.
94. Choose the VBA code used to close database and the Microsoft Access instance.
95. What is a result of this code? Sub Test() Dim myNumber As Double myNumber = -10.635 Debug.Print Fix(myNumber) Debug.Print Int(myNumber) End Sub
96. Out put of below code: Dim a As Single Dim b As Single a = 7 b = 2 MsgBox a / b & ", " & a \ b
97. To remove the records listed in a subform, which property and value would you need to add to your VBA code.
98. Output of below code: Dim a As Integer Dim b As Integer a = 1000 b = 33 MsgBox a * b
99. Which of the following would NOT be a good use for a macro?
100. What is the short cut to get Immediate Window
101. Which tools should be used to compile the program?
102. What reference will you add to add active x objects ,i.e. buttons, at runtime?
103. To change the font color a textbox field, choose the VBA code that will allow you change the control's property.
104. A VBA unit is called a _____.
105. Choose the VBA code to allow you to obtain the value from Row 2 and Column 3 of a mutliple column listbox.
106. Choose the function used to send an table's contents in Excel format by email from Access.
107. To create one array variable to store monthly mortgage rates over the course of a year, the following is the best declaration statement.
108. To concatenate two lines of VBA code into one line, insert which character between the two joined lines?
109. In order to prevent users from deleting database objects displayed in the Navigation Pane, what VBA code would be used?
110. To return the value of the Access database file's path, what VBA code will retrieve the value?
111. How can we declare a subroutine or function in VBA?
112. What is a Collection object?
113. In the statement 'x = 400 * y', what is the maximum value that y can be if x has been declared as in Integer?
114. What is PlainText ?
115. This code shows the first statement of CalledSub. Which calling statement will work properly? Sub CalledSub(Surname, Age)
116. What is the principal difference between a class and an object?
117. You have several variables to display on a user form, and there are too many variables to display at once. Which control best enables the user to see all the variables?
118. EmailAddress() is an array. It is declared by Dim EmailAddress(10) As String, and option Base 1 is in effect. How many rows and columns are in EmailAddress()?
119. Which cell is selected if you run this code Range("E3:312").Range("B3").Select
120. Which variable name is valid in VBA?
121. The recording of a macro in Word is likely to be an incomplete record of the user's actions. Why?
122. Which statement should precede a subroutuine's error handler?
123. Which statement is true?
124. A declaration has scope, which has three levels. What are they?
125. There are two references that must be selected in the Visual Basic Editor in order for any Visual Basic code to run in Excel. What are these two references?
126. Which action will cause your project to reset its variables?
127. Which keyboard shortcut causes VBE to locate the declaration of a procedure?
128. When you define a new class of object, where do you assign a name to it?
129. How does a class module indicate that it uses a particular interface?
130. What is needed for the contents of Module1 to be availble to other modules in a VBA project, but not to any other VBA project?
131. When used with an array named MyArray, what is the preerred way to set beginning and ending values of a loop control variable?
132. Which statement declares an array?
133. To use VBA code to maintain a different VBA project, you can make use of VBA's extensibility. What is needed to enable extensibility?
134. If VBA code declares FileCount as a constant rather than a variable, the code tends to run faster. Why is this?
135. A VBA project must declare four classes. How many class modules are needed?