The interface used to take a test is shown in Figure 8.10. I removed the Option Button controls from the Chapter 4 program and added a Combo Box and a Command Button control; otherwise, the interface is the same. I set the Style property of the ComboBox control to fmStyleDropDownList so the student cannot enter a new name but only choose existing names from the list. As usual, I also edited the Name property and a few appearance properties of the ActiveX controls at design time.
Command Button control
The Math Game worksheet interface.
The process of taking a test is uncomplicated and nearly identical to the Chapter 4 program. After a student selects his or her name from the Combo Box control, the Command Button control labeled Begin is enabled and must be used to start the test. The appropriate test is loaded into the Create_Edit_Tests worksheet to provide the source for the test questions. Problems are presented one at a time and the student must enter an answer to each problem before continuing. The answer cell remains selected at all times during a test. When the student finishes the test, or the allotted time runs out, the test is scored and written to the worksheet. The length of time allotted for a test is also read from the Create_Edit_Tests worksheet. After completing a test, a student can print the range of cells containing the problems, answers, and score (columns A through C) with a click of the Command Button control labeled Print.
Was this article helpful?