Applications Programming --- Lab 4

Objective:

References:

Problem Description

A farmer sets up a stand in the Farmer's Market and sell the following things:

Your Tasks:

  1. Download the Lab 4's template workbook file: lab4-input.xlsx.
  2. Open the template file you just downloaded and design and implement a VBA program that handles a transaction of a customer for the farmer.
    1. Your program first collect the following information about the transaction:
      • the amount of blueberry (in pounds) purchased,
      • the amount of apple (in pounds) purchased, and
      • the number of copies of the recipe book purchased.
    2. Calculate the charge of the goods (sub-total) of the transaction according to the information collected and the unit price of each type of goods. There is an extra 5 percent GST tax charge on the charge of the recipe book(s). The total charge of the transaction is the sum of the sub-total and the GST tax if there is any.
    3. Use a message box to show the final total charge.
    4. Enter the collected information, the charge of goods, the tax and the final total charge to the appropriate cells in the active row. You can assume that the Active Cell is placed on the first column of the active row.
  3. Save your work to a Macro-enabled Excel (with the extension name .xlsm).

When you develop your VBA program, you need to pay attention to the following things:

There is a weekly Assignment 4 following this lab.