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

SIE 377 Fall 2015 Mid Term 1 10/2/2015

You must complete this Mid Term via a computer. You can reference books, MSDN online and
notes/sample code from class, but no communicating with others or using someone else’s code.
Download the file “SIE 377 2015 Mid1.xlsm” from D2L under discussion topic: Mid Term 1.

Problem 1 (40 points):

In the file: “SIE 377 2015 Mid1.xlsm”, a manager wrote a sub trying to find 2 top scoring employees, and
give them prizes. The sub called “Prize”, which is in module 1 will:

1) Find the 2 employees with highest average scores;

2) Ask the user to input the prize amounts;

3) Output a message box about the winning employees and their prizes.

However there are some bugs in the sub. Find them and correct them. When you fix an error, put a
comment on or above that line of code stating what error you fixed.

Note: To help you check your work, employee 2 has the highest average score and employee 14 has the
second highest average score.

Problem 2 (15 points)

In the file “SIE 377 2015 Mid1.xlsm”, go to the sub called “ChangeToWithConstructs” and re-write this
code to maximize the use of With Constructs

Problem 3 (15 points)

In the file “SIE 377 2015 Mid1.xlsm”, write a new sub called “MySampleMessageBox” that does the
following

a) Displays an inputbox that asks the user for their name. The inputbox must have the title:
“UserName Input” and must store the results in a string variable.
b) Generate a message box that displays the message: “The first letter in the username is:”
followed by the first letter of the username that was captured from the inputbox.
c) The message box should display 3 buttons: Yes, No and Cancel.

Problem 4 (30 points)

In the file “SIE 377 2015 Mid1.xlsm”, write a new sub called “MyRangeDemonstration” that does the
following using worksheet “Data”:

By offsetting from Cell A3, set a range variable referring to cells B22 through G22.

Inserts a formula in those cells that will calculate the average of the 18 employee results for that
score. So as an example, the formula in cell B22 with be the average of cells B4 to B21. You can use
any method or approach you would like.

Submit all work to D2L Dropbox under MidTerm1.

This study source was downloaded by 100000884252582 from CourseHero.com on 04-17-2024 18:22:07 GMT -05:00

https://www.coursehero.com/file/25394940/SIE-377-2015-Mid1pdf/
Powered by TCPDF (www.tcpdf.org)

You might also like