Requirements for Word Find

The objectives for the Word Find project are to demonstrate some basic techniques for file I/O and error handling in a VBA program. To accomplish the task, I use an Excel worksheet as the grid for a word search puzzle and a VBA form for updating the data required by the program. The requirements for the program follow:

1. A VBA form (UserForm object) shall be used as the interface for updating the program's data (words and topics) stored in a random access file.

2. The form shall display all unique topics stored in the data file.

3. The form shall display all words stored in the data file that are associated with a user-selected topic.

The form shall allow the user to add new records to the data file.

The form shall allow the user to update (edit) previously stored words in the data file for an existing topic. Note that the program will not allow for existing topics to be updated.

The form shall display new and updated records as they are created.

An Excel worksheet shall be used to create the word search puzzle.

The puzzle worksheet shall isolate an area of cells (fifteen by fifteen cells in size) for displaying a puzzle.

The puzzle worksheet shall isolate an area of cells for displaying the list of words that have been added to a puzzle.

The puzzle worksheet shall isolate an area of cells for displaying help/error messages to the user when creating a puzzle.

The puzzle worksheet shall isolate an area of cells for displaying a puzzle's title. The puzzle worksheet shall display a list of unique topics from the data file for the user to choose from when creating a puzzle.

The puzzle worksheet shall display a list of words from the data file associated with the topic selected by the user.

The user shall be able to select a word from the displayed list of words on the puzzle worksheet and add it to the puzzle by indicating a starting position on the puzzle grid.

The user shall be able to select a direction for a word added to the puzzle from a series of buttons on the worksheet.

The program shall validate the user's selection for the location of a word to ensure the entire word fits within the defined area of the puzzle grid. There will be no validation to prevent a word from overwriting another word(s).

The user shall be able to clear the contents of the puzzle, the list of words in the puzzle, the list of topics, and the list of words associated with the selected topic from a button on the worksheet.

The user shall be able to finish a puzzle by adding randomly selected uppercase letters to the empty cells in the puzzle grid from a button on the worksheet.

The user shall be able to print the puzzle and the list of words contained in the puzzle from a button on the worksheet.

The user shall be able to display the form used to update the data in the data file from a button on the worksheet. Note that the user will not be able to edit the data in the file directly from the worksheet.

21. The user shall be able to refresh the list of topics, and list of words associated with a topic from a button on the worksheet.

22. The data for the program shall be stored in a random access file containing three fields of data per record. The first field contains the numbers used to identify specific records (rows) of data. The second field contains the topics, and the third field contains the words associated with the topics in the second field.

23. The data from the file shall be stored in a worksheet that is hidden from the user. The data from the file shall be written to the worksheet when the user elects to show the update form.

24. When the user chooses to edit an existing record or add a new record, the program shall write the new data to the text file and the hidden worksheet.

As with every program you write, you will edit the requirement list after you have designed it; sometimes even after you started writing the program because it is nearly impossible to think of everything from the beginning. I added and removed requirements from the previous list after careful consideration of the program's design and objectives.

Biorhythm Awareness

Biorhythm Awareness

Who else wants to take advantage of biorhythm awareness to avoid premature death, escape life threatening diseases, eliminate most of your life altering mistakes and banish catastrophic events from your life.

Get My Free Ebook


Post a comment