Question
. Create a macro named SubmitSales with shortcut key Ctrl+Shift+S, assigned to this workbook. The purpose of the macro is to automate the moving of
. Create a macro named SubmitSales with shortcut key Ctrl+Shift+S, assigned to this workbook. The purpose of the macro is to automate the moving of the data entered in the sales entry form to the SalesList worksheet and then to clear the data in the sales entry form. Create a custom button on the SalesEntryForm worksheet with the label Record Sale that automatically launches this macro. For best results, use the following procedure: Before recording the macro, assign range names to the following cells: Apply the Use Relative References option to make sure that when recording your macro, the insertion point is relative to the active cell. (Hint: The Use Relative References button in the Code group on the DEVELOPER tab toggles this feature on and off. Be sure the button is highlighted in green to indicate that the feature is on before you begin recording the macro.)
OpentheGoToboxbypressingtheF5functionkey,andthenselecttopinthelist of range names to move the starting point on the SalesList worksheet to cell A5. Press Ctrl+ to move the active cell to the bottom of the list. Then, using the arrow keys, move the active cell down one row to the first empty cell. Type = Sales_Rep_Name. Move to the next column where the user will enter the sales date, and then type =Sales_Date. Repeat this procedure to enter the sales amount and commission using their corresponding range names. Copy the cells with the formulas you just entered, and then use the Paste Special Values option to paste the cells in the same location. This past action removes the formulas, but keeps the values that appear in the data entry form. Go to the Sales_Rep_Name range, and delete the entry. Move down one cell, and delete the sales date and sales amount. You must clear the input data to leave the cells ready for the next user to enter new data. Press the Esc key. Stop recording.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started