Written Macro Assignment Solutions
True/False Questions. Read each statement carefully, and neatly write the word TRUE on the line next to the statement if you believe the statement is true, or neatly write the word FALSE on the line next to the statement if you believe the statement is false.
1. Do…Loops are used in macros to repeat lines of code a specified number of times.
2. The area where macro code is displayed in Visual Basic is called the Code Window.
3. A macro name is not required when creating a private macro.
4. When declaring a variable, Dim stands for “define in memory”.
5. Objects, Variables, and Actions are used to write macro code.
6. One way to create a new macro is to use Record New Macro.
7. The If…Then…Else…End If code allows code to be conditionally executed depending on whether a specified logical condition has been met.
8. The last line of code for a private macro should be End Private Sub.
9. The formula for a user-defined function must be entered in quotation marks.
10. A public macro/procedure is activated by the user pressing the shortcut keys or clicking on a button.
Problems. Read each problem carefully and follow the instructions given.
1. Open up Excel. Go to Cell E9 and use the Name Box to name this cell “Winter”. Then go to the Developer tab on the Ribbon, and click on the Record Macro button in the Code group. Name your macro “Referencing” and give it a shortcut key of “R”. After clicking OK to close the Record Macro dialog box, do the following:
• Select Cell C7 using absolute referencing (do not select the Use Relative Reference button). • Using the drop-down arrow to the right of the Name Box, select “Winter”. • Click on the Use Relative Reference...
Please join StudyMode to read the full document