These are projects posted by the students of Dr. Gove Allen at Brigham Young University. These students have taken one semester-long course on VBA and generally have had no prior programming experience

Monday, April 12, 2010

Get a Room! - Mark Tuttle - Winter 2010


Each semester brings new group projects that require meeting together on many occasions. Usually the worst option is meeting at someone’s house or apartment. Thus it falls on someone in the group (hopefully responsible) to remember to reserve a room for the group. However, if this person remembers too late, or even in time but during a busy week, then the chances of getting a room that suits the group’s needs are very small. In fact, most of my group meetings occur after 5:00 PM due to this problem. Sometimes a group will find an open room during busy hours only to be kicked out at the next half hour because a different group had it reserved. When we learned how to access internet explorer, make JavaScript calls, and maneuver in an internet browser, I saw a solution to this problem. My project will involve entering in the times that our groups need to meet and four nights before the day my computer will automatically make the appropriate reservation.

The Reservation System

The system is designed to handle both manual reservation events and an automated reservation that is called at a specified time each day.

The manual system is initiated by clicking the button “Reserve!” below the cells that contain the information. The code then collects the information in the spreadsheet and calls a user entry window to enter the username and password and then performs the reservation at the appropriate time and date. The internet browser is opened, the username and password are automatically put in the window, and the JavaScript reservation is called.

The automation system is performed all automatically, without any need for user input besides establishing the times each day and the room they wish to be reserved. Windows Task Scheduler calls a VBScript that initiates the process, calls the appropriate method, and then saves and closes Excel.

In both cases the code handles the format of the time and dates that are entered. The only issues that aren’t handled by the code involve entering the military time for the reservation time and making sure there is an established internet connection (and any internet user validation already completed).

Final Paper

Excel Project

No comments:

Post a Comment

Blog Archive