550 points
Do all of these problems in a single Excel Workbook. Solve each problem on a separate Worksheet. Your Excel File must be setup like you did in Formative01 with appropriate Worksheet tab names.
(200) When done, upload your file, named Summative07.xlsm, (this is to be a Macro-Enabled workbook) to the D2L Assignment Folder 'Summative07'.
Before beginning this homework, you are strongly advised to first read Chapters 1 to 3.
Recording Macros
Chapter 2- The Macro Recorder is explained in this chapter. Learning to use the Macro Recorder can save you a lot of time learning how to program in VBA. Follow the directions and record the macro described in this chapter which adds your name to a cell. Then record a macro that sets the page orientation to Landscape. Open the VBA IDE and view the Code Module.
(75) 1. Provide a copy of the first 10 lines of your macro code below.
(25) 2. Briefly describe the mechanism to comment out lines of code.
(50) 3. Briefly describe why it is better to comment out lines of code rather than deleting lines of code. Hint: what happens if something were to happen requiring you to revert to an earlier version of your code?
Simple macros
Write a macro which will do the following:
(50) 4. Copy and paste the resulting text in the space below. Note you will loose points for unnecessary code.
Objects
Review Objects and Collections in the VBA help menu. If necessary use Google or the Internet to research, review and answer the following questions.
(50) 5. Briefly describe what the following VBA code does to a worksheet: Range("E10").Formula = "=RAND() * 10"
Range("E10").Formula = "=RAND() * 10"
(50) 6. Briefly describe what the following VBA code does to a worksheet: Range("A2, A4, A6, A8, A10") = 745
Range("A2, A4, A6, A8, A10") = 745
(50) 7. Briefly describe the purpose of the Object Browser: