Microsoft Visual Basic
Forms exercise
Relatively easy

This Microsoft Visual Basic FORMS exercise is provided to allow potential course delegates to assess their suitability for the Wise Owl EXCEL 2007 VISUAL BASIC course only, and may not be reproduced in whole or in part in any format without the prior written consent of Wise Owl.

Exercise: Simple form to enter a film name and add to list

A full answer to this exercise is provided as part of the training course!

1) Download the files needed to start this exercise: exercise-922.zip (and click here if you experience any problems unzipping this file after downloading it).
2) Add a form to the workbook in the above folder for adding a film:
Exercise screen-shot 2036 Your form could look like this - the yellow popup caption is the ControlTiptext property
3) Add code to the Cancel button so that it closes the form, and to the OK button so that it:
  • Goes to the bottom of the film name column
  • Goes one cell further down
  • Sets the value of this cell to be the film name entered
  • Sets the value of the cell one to the right to be the category entered
Training exercise hint Ideally your form should also check that a user has filled in all of the 3 fields.
4) If you have spare time, you could add code to check that the film entered does not already exist in the list.
5) Save this workbook as Best films.xlsm, then close it down.

Thank you for showing an interest in this Excel 2007 Visual Basic training course! As mentioned above, full answers to this and other exercises are provided on the course. On all Wise Owl scheduled courses delegates can take away these model answers (together with their own efforts!) on a free USB stick.

All content copyright Wise Owl Business Solutions Ltd 2008.  All rights reserved..