Microsoft Access
Good programming techniques exercise
Average difficulty

This Microsoft Access GOOD PROGRAMMING TECHNIQUES exercise is provided to allow potential course delegates to assess their suitability for the Wise Owl ADVANCED VISUAL BASIC FOR APPLICATIONS course only, and may not be reproduced in whole or in part in any format without the prior written consent of Wise Owl.

Exercise: Functions with arguments in advanced VBA

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

1) Download the files needed to start this exercise: exercise-940.zip (and click here if you experience any problems unzipping this file after downloading it).
2) Create a function called MedalPoints which takes 3 inputs:
  • the number of gold medals won for a country
  • the number of silver medals won
  • the number of bronze medals won
3) Your function should return the points total for the country, according to the Wise Owl rule that you get 5 points for a gold, 3 for a silver and 1 for a bronze.
Exercise screen-shot 2170 How your function should look in the function wizard
4) Type your function into the Excel worksheet in the Points column and copy it down - you should find that Russia move up to second place, but that the USA are still top with 321 points.
5) Save your workbook as Points Calculated, then close it down.

Thank you for showing an interest in this Advanced Visual Basic for Applications 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 � Wise Owl Business Solutions Ltd 2007.  All rights reserved.  Design by Branches.