c. Continue to set the value of the cells in the fifth row
of the Order History equal to their
corresponding entries in the Order Form worksheet. Your last
command should set the value
of cell N5 in the Order History sheet equal to cell F10 in
the Order Form sheet.
6. After an order is submitted and stored in the Order
History log, it should be cleared
from the Order Form sheet. Using the ClearContents method of
the Range object, add a VBA
command to the Add_Order procedure to clear the contents of
the previous order using the
parameter value C5:C6, C9, F5:F10.
Q624
7. In the
c. Continue to set the value of the cells in the fifth row
of the Order History equal to their
corresponding entries in the Order Form worksheet. Your last
command should set the value
of cell N5 in the Order History sheet equal to cell F10 in
the Order Form sheet.
6. After an order is submitted and stored in the Order
History log, it should be cleared
from the Order Form sheet. Using the ClearContents method of
the Range object, add a VBA
command to the Add_Order procedure to clear the contents of
the previous order using the
parameter value C5:C6, C9, F5:F10.
Q624
7. In the Excel workbook, delete the blank fifth row in the
Order History worksheet.
8. Save the workbook.
9. Assign the Add_Order macro to the Submit Order button on
the Order Form worksheet.
10. Use the macro you wrote to add the orders shown in
Figure C-25 to the Order History
worksheet. Verify that the Order Form is cleared after each
order is submitted.
Case Problem 2
Data File needed for this Case Problem: Red.xslm,
Stores.xlsx
Red Hot Ribs Amanda Gard is a sales manager for Red Hot
Ribs, a popular chain of restaurants in
the Midwest. One of her duties is to tracks sales figures
from the 21 stores. The past years sales data
for these stores is in a workbook named Stores. Each stores
information is in a separate worksheet
numbered as Store 1, Store 2, and so forth through Store 21.
Because navigating 21 worksheets is cumbersome, Amanda
created a second workbook to display
summary information for a single store. All of the sales
values in this workbook are linked to source
data in the Stores workbook. Currently, the workbook
displays information about the first store. To
display the information for a different store, Amanda had to
replace the store number in a selected
range with the store number she wants to view. The formulas
are then updated to display information
about the specified store.
To automate this process, Amanda created a data validation
rule so she can select a store from a list
of the 21 stores. She wants Excel to automatically replace
the data in the worksheet with data from
the store selected in the list. To do this, youll need to
use the Replace method of the Range object,
which has the syntax
Range.Replace OldText, NewText
where Range is an object reference to a cell range, OldText
is text within that range to be replaced,
and NewText is the new text you want to substitute for the
old text. For example, the statement
Range(A1:A10).Replace red, hot
replaces every occurrences of red with hot in the range
A1:A10. Complete the following:
1. Open the Red workbook located in the ExcelC _
Case2 folder included with your Data Files,
and then save the workbook as Red Hot Ribs in the location
specified by your instructor.
Q625
2. In the Documentation worksheet, enter your name and the
date.
3. Review the formulas and contents of the Sales Report
worksheet. Note that all of the data values
in the range B6:B7;B9:B21 are formulas linked to cells in
the Stores workbook. For example,
cell B6 is linked to cell B3 in the Store 1 worksheet of the
Stores workbook.
4. Unlock cell B4, which contains the list of stores that
Amanda can choose from, and then protect
the Sales Report worksheet using the password redhot so that
the only cell in this worksheet that
users will be able to change is cell B4.
Q626
5. In the Visual Basic Editor, in the Module1 module, insert
a new sub procedure named
Retrieve_Sales.
6. In the Retrieve_Sales sub procedure, declare the
following variables: OldStore with the String
data type and NewStore with the String data type.
7. Set OldStore equal to the value of cell D7. Set NewStore
equal to the value of cell B4.
8. Insert a VBA command to unprotect the Sales Report
worksheet using the
Unprotect method with the password redhot.
Q627
9. Use the Replace method of the Range object to replace all
occurrences of
OldStore with NewStore in the range B6:B21, where OldStore
is the value of the OldStore
variable and NewStore is the value of the NewStore variable.
10. Use the Replace method to replace the occurrence of
OldStore with NewStore in cell D7.
11. Use the Protect method to protect the Sales Report
worksheet using the
password redhot.
12. Close the Visual Basic Editor and return to the Red Hot
Ribs workbook.
Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.
You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.
Read moreEach paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.
Read moreThanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.
Read moreYour email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.
Read moreBy sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.
Read more