Microsoft Visual Basic
Class modules exercise
Average difficulty

This Microsoft Visual Basic CLASS MODULES 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: Creating a pie chart class

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

1) Download the files needed to start this exercise: exercise-412.zip (and click here if you experience any problems unzipping this file after downloading it).
2) The aim of this exercise is to make it easier to create a pie chart, so that you can run the following code:
Exercise screen-shot 2179 With classes it always helps to have the destination in mind
3) After running the code above, your final chart will look something like this:
Exercise screen-shot 2180 This is a separate-sheet chart, with slice 3 exploded
4) With all of this background, you're ready for the task!  Create the class called SimplePieChart, and add the properties and methods necessary to get the above code to work.
Training exercise hint Make full use of recording to get the right code in the first place.  
5) When you have your code working, save this file as Pie Chart Class and 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 copyright Wise Owl Business Solutions Ltd 2008.  All rights reserved..