SIE 377 Midterm Exam 2 2019

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

SIE 377 Midterm Exam 2 Fall 2019

Rules: You must complete this exam using a computer. You may reference books, MSDN online, StackOverflow, your
class notes, sample code from class, or your own code. However, you may not communicate with others or use
anyone else’s code, including posting a question or solution to a forum (e.g., StackOverflow).

All work must be programmed in VBA or Python, depending on the solution requested. No macros.

VBA 50 Points
1. Instructions: Download the file “SIE 377 Midterm2ExamVBA.xlsm” from D2L under the Content Topic: Exam.

You have just been hired by the SIE Facility Management Corporation. Part of your new duties involve
checking the locations and reporting on the number of Products and Employees in each facility.

There is a worksheet in the Excel file named Warehouses that contain the number of Products and
Employees at each location.

Using VBA, you must create a User Form with the title Warehouse Locations, as shown below. You will need to add
a list box that will contain the locations when the User Form is shown. During initialization of the form, you will need
to load the listbox entries from the data on the spreadsheet so that it looks like the form below. The first location in the
list, Seattle, will be selected by default when the form shows.

You must call this User Form from Sub Main() in the Module Problem1. When the user clicks the OK button, the
Warehouse Locations User Form closes and a message box is displayed that reports the location the user selected,
and with the values selected for whether the report should show Products and / or Employees (see image below.)
The message box must also be called from Sub Main().
SIE 377 Midterm Exam 2 Fall 2019

When the user clicks cancel on the Warehouse Locations User Form, the form closes and the program ends.

All buttons, captions, labels, titles, content, etc. should match the images provided here.

Python 50 Points

2. Instructions: Download the file “WarehouseData.xlsx” from D2L under the Content Topic: Exam.

Create a Python program that reads the data on the worksheet named Warehouses in the WarehouseData.xlsx
Excel file (shown below).

Using Pandas and XlsxWriter, create a new .xlsx file named ‘pandas_data_chart.xlsx’ and write the data out to a
worksheet named Warehouses (shown below). Create a chart on that same worksheet starting in cell F5 that
matches the chart below.
SIE 377 Midterm Exam 2 Fall 2019

As shown in the Chart above, the following need to be set:

 Title: Products and Employees by Location

 Chart Type must be column

 Y Axis: Quantity

 X Axis: Location

 Legend must match

 Everything must appear as it does in the chart above, except the colors may be different.

You might also like