Templates, Styles, and, Macros
You are the accounts receivables manager for DLJ Enterprises, a national textile company headquartered in Detroit, Michigan. As part of your daily tasks, you mail invoices to the various companies that use your services. After years of manually creating invoices, you have decided to create a template invoice that can easily be modified for each user. You have also decided to add macros to this template to provide the ability to clear contents and print.
For the purpose of grading the project you are required to perform the following tasks:
Download and open the file named exploring_e12_grader_a1.xlsx, and then save the file as e12c2Invoice_LastFirst in the macro-enabled template file format, replacing LastFirst with your name.
Click the VIEW tab in the ribbon, and click Headings in the Show group.
Click cell B3 and type DLJ Enterprises. (include the period).
Apply the Note Cell Style to cells C8:C10 and B15:C16. Apply 60% Accent 3 to cells B8:B10 and H8:H16.
Record a macro named ClearInvoice. The macro should clear the contents of the range C8:C10, then the range B15:C16, then the range I8:I16, and finally the range B21:I34. (Do not clear the contents in all of the ranges simultaneously.) Once completed, stop the macro recorder and save the template.
Create a new macro button named Reset that spans the range B47:D52 and assign the ClearInvoice macro as its action.
Open the VBA Editor and create a new module. Create a new function named freight. Craft this function to calculate cost * rate.
Apply the function to cell I37 using .10 as the rate. Save the template.
Unlock the following cells: C8:C10, B15:C16, I8:I16, and B21:I34.
Delete any data that is currently in cells: C8:C10, B15:C16, I8:I16, and B21:I34.
Open the VBA Editor and select the module containing the macro button source code. Copy the code beginning with the text Sub ClearInvoice() and ending with the text End Sub. Create a new worksheet named Code to the right of the Basic Invoice sheet. Paste the code in cell B3 on the Code worksheet. The copied code will fill the range B3:B18.
Open the VBA Editor and select the module containing the custom function. Copy the code beginning with the text Function freight(cost, rate) and ending with the text End Function. Paste in cell B20 of the Code worksheet. The copied code will fill the range B20:B24.
Save the file as an Excel Workbook with the name e12c2Invoice_solution. Ensure that the workbooks are displayed in the following order: Basic Invoice and Code. Close the workbook and exit Excel. Submit the e12c2Invoice_solution.xlsx workbook as directed.