Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
CP212 EXAM REVIEW QUESTIONS LATEST UPDATE 2024/2025 WITH 100% DETAILED VERIFIED ANSWERS
Typology: Exams
1 / 10
Which programming concept can be described as "The parts of a program have access to which other parts?" The Scope What VBA function can be used to check to see if a value is a vlid date isDate() What is the scope of the salary variable Sub Test1() Dim salary As Currency salary = 5000 End Sub subroutine level scope On assigning a value to a new variable inside a function it automatically becomes a global variable (T/F) False A subroutine cannot call a function (T/F) False What is the name of the VBA object that represents an excel file
Workbook Which VBA command will allow you to access values from a Userform called myUserform before the Userform is displayed to the user Load myUserform Which VBA statement is typically used to display a Userform called myUserform on the screen for the first time Show myUserform A Userform that allows you to keep working in Excel while its. open is called: Modal What is the line of code used to have your program continue when an unusual error happens On Error Resume Next What line of code is used to turn error handling off On Error Go To 0 In the following code what is the word "DataEnrtyError" called in VBA? Sub someErrors() On Error Go To DataEntryError Statement On Error Go To 0 Exit Sub DataEntryError: MsgBox "Error" End Sub Label You are working on an application where all the customer files are kept in the same folder, but you don't know which folder. Which is the better solution for a graphical interface-based application? Display a folder picker dialog box so the user can select the right folder
What library contains the FileSystemObject Microsoft Scripting Runtime Library What object allows you to preform file operations such as remaining, deleting, or checking to see if a file exists FileSystemObject Which dialog box allows the user to select one re more files that can then be opened in excel using the execute command msoFileDialogFilePicker What is the essential element in any relational database Field What scripting language is used to preform queries on a database SQL Microsoft access is a server based relational database management system (T/F) False What are the reasons you would choose to automate a pivot table by providing a GUI application to a user the user doesn't need to know how to use pivot tables and answers to data driven questions can be provided easier What objects are required to automate a pivot table with VBA code PivotCache, PivotTable Which can be sources of data for a pivot table access database, excel worksheet, oracle database What language is used to design the Microsoft Ribbon interface XML
When you customize the Quick Access Toolbar (QAT) you have hundreds of images from the image galleries to choose from (T/F) True Which attribute is used in XML to indicate the image used on the ribbon when creating a custom ribbon? imageMSO The solver add in was written by Microsoft (T/F) False What VBA command is used to automate solver to generate a solution once it has been set up? SolverSolve If you were using Solver to build a production planning application for a client which optimization techniques would you use depends on the clients needs and request You are running an application that uses the Solver add-in, but Excel displays an error message. What steps should you use to solve the get Solver running?
RecentPrices(0 To 100) As Double End Type A user defined type What is a class? Blueprint for an object The values xlRed, xlBlack, xlGreen, and xlBlue are examples of a one Enumeration What is an object? an instance of a class What makes collections superior to arrays in VBA they have more features to add and remove items What sub automatically runs when an object is instantiated A constructor What is used to calculate for-casting errors Mean Absolute Error (MAE) What is a forecasting (trend-line) technique available in Excel Linear Forecast What is the top object of the VBA object model hierarchy Application If you want to set text in a range to be displayed in bold, what value do you assign the Font Bold property of the range True Recording a Macro creates a tight, efficient code that doesn't need to be edited (T/F) False
If you use option explicit at the top of the code window you have to explicitly declare your variable data types (T/F) True When should you declare a variable as a constatnt
The Address property returns the address of a range as a string, such as "B2:C6" add a new worksheet after the last worksheet in a workbook Sheets.Add After:=Sheets(Worksheets.Count) What does the message box display Dim x As Single Dim y As Integer x = 2 y = 4 Do x = x * y y = y + 1 Loop While y < 4 MsgBox x 8 What list of numbers is produced by the following code For i = 5 to 1 Step - 2 : MsgBox i : Next 5, 3, 1 How many times is the message displayed Dim isValid As Boolean Dim i As Integer Do Until isValid For i = 1 To 5 MsgBox "Welcome" isValid = True Next i Loop 5
What values of c get displayed by the message box Dim i As Integer Dim c As Integer For i = 5 To 10 Step 5 MsgBox "Val of c:" & i C = C + 1 Next i 5, 10 What gets print in the debug statement Dim i As Integer Dim c As Integer For i = 5 To 10 Step 5 MsgBox "Val of c:" & i C = C + 1 Next i Debug, Print c 2 What sheet does Worksheets (2) refer to? The second worksheet from the left Why should you refer to worksheets by code name instead of a number?
Which of the objects below is likely a Collection object? a. Range b. Chart c. Worksheet d. Workbooks d. Workbooks Why should you refer to charts in the Charts collection by name instead of by a number?
Why should your application use dynamic arrays? In some cases you dont know at runtime how large the array has to be You can resize a static array using the Redim keyword (T/F) False The preserve keyword can be used to keep existing values in an array when it's used on a static array (T/F) False The preserve keyword can be used to keep existing values in an array when it's used on a dynamic array (T/F) True What are the 2 types of arrays supported by VBA Static and dynamic Write a line of code that declares a dynamic array that will store Currencies? Dim myArray() As Currencies The preserve keyword can be used to clear all the values out of an array (T/F) False The redim keyword can be used to clear all the values in an array (T/F) True