VBA Homework

profileshaokumu
M7_Ex1.xlsm

Instructions

Name: Student Name Template Version 1.1
Module: 7 Max Pts: 10
Exercise 1 Parts: 1 Rubric: Standard VBA
Objective:
Import paired comparison options from a text file
Determine number of options and prepare the comparisons
Instructions:
This is new code but most of it can be found in pieces of other assignments.
This assignment will prepare a new paired comparison based on the contents
of a text file with a single line of comma delimited options.
Use GetOpenFilename to navigate to the input file, then open for input.
(Note: Two files are included with the assignment. You can create your own.)
Split the single line of data to the array arrOptions.
Determine the number of options by examining the lower and upper bounds.
Using nested loops similar to a previous assignment, create the pairs needed.
Output the comparison number, index pairs, and option names to the Output sheet.
Create your own input file with several options. Run the program then save the file.
(Professor will check your output before running code. Do not submit data file.)
All Assignments:
Enter your name at the top of the instructions sheet
Add comments to explain major parts of code
Assign macros to buttons (if not done already)
If unable to fix crashing code, add comment at spot of crash explaining
what you've attempted to do to fix it and ideas on what could be wrong
Rename the file to include last name (Smith_M1_Ex1.xlsm) and submit
Check the boxes to be sure you completed all requirements
========================================================================

Prep Pairs

Output

Comparison Index1 Option 1 Index2 Option 2 WinnerIndex Winner
1 1 DisneyWorld 2 Bora Bora
2 1 DisneyWorld 3 Grand Canyon
3 1 DisneyWorld 4 Alaskan Cruise
4 1 DisneyWorld 5 Redwood Forrest
5 1 DisneyWorld 6 Wine Country Tour
6 2 Bora Bora 3 Grand Canyon
7 2 Bora Bora 4 Alaskan Cruise
8 2 Bora Bora 5 Redwood Forrest
9 2 Bora Bora 6 Wine Country Tour
10 3 Grand Canyon 4 Alaskan Cruise
11 3 Grand Canyon 5 Redwood Forrest
12 3 Grand Canyon 6 Wine Country Tour
13 4 Alaskan Cruise 5 Redwood Forrest
14 4 Alaskan Cruise 6 Wine Country Tour
15 5 Redwood Forrest 6 Wine Country Tour

Prep Pairs