Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

CP212 EXAM REVIEW QUESTIONS LATEST UPDATE 2024/2025 WITH 100% DETAILED VERIFIED ANSWERS, Exams of Business Administration

CP212 EXAM REVIEW QUESTIONS LATEST UPDATE 2024/2025 WITH 100% DETAILED VERIFIED ANSWERS

Typology: Exams

2024/2025

Available from 10/28/2024

Wanjiruesther
Wanjiruesther 🇰🇪

5

(2)

846 documents

1 / 10

Toggle sidebar

Related documents


Partial preview of the text

Download CP212 EXAM REVIEW QUESTIONS LATEST UPDATE 2024/2025 WITH 100% DETAILED VERIFIED ANSWERS and more Exams Business Administration in PDF only on Docsity!

CP212 EXAM REVIEW

QUESTIONS LATEST UPDATE

2024/2025 WITH 100%

DETAILED VERIFIED ANSWERS

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?

  1. a. Click Tools > References to make sure there is a reference to the solver library.
  2. a. Click File > Options > Add-ins to make sure the Solver add-in is loaded. Solver is used to solve linear equations in areas such as production planning, product mix, and many others (T/F) True What does the following code describe? Type Stock StockTicker As String CompanyName As String

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

  1. when the value wont change during your program
  2. when you don't want to have magic numbers in your program One of the benefits of using object variables is that it can save you a lot of typing (T/F) True Name the 3 types of program errors syntax, runtime, logic How does cells work (rows, columns) one less than you would think How does offset work (rows, columns) the same amount you would think Name the cell that is selected by the following code: Range("D5").Cells(2,3).Select F What cell does the following code refer to LocationX = Range("D4:F8").Cells(2,3).Value The cell at the second row and the third column from D Which line of code uses the SUM() function build into Excel to calculate the total of the numbers in the range called "values" and places the result in a range called "total"? Range("total").Value = Application.WorksheetFunction.Sum(Range("values")) What does the Address property of a Range do?

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?

  1. If a user renames the sheet, your code will still refer to it
  2. If a user moves a worksheet, your code will still refer to it
  3. You can refer directly to the worksheet by the code name without declaring a new object and using Set The Workbooks collection holds a reference to all Excel files on your computer (T/F) True

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?

  1. It makes your code easier to read
  2. If a user moves a chart your code will still refer to it
  3. If a user creates more charts your code will still refer to it It is possible to refer to a member of a collection by using a numeric index (T/F) True To refer to any particular member of a collection you have to include the name of the member in double quotation marks (T/F) True The Workbooks collection holds a reference to all the Excel files you have open (T/F) True You have created an array called Sales that holds 11 elements. You want to clear all the data and reset the size of the array to 0. Write a line of code will do this? Assume Base 0. Redim Sales(0) Write a line of code declares a static array of 9 String elements? Assume Base 0. Dim myArray(8) As String What is an array in VBA An array is a container of data of the same type

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