Microsoft Developer
Recording macros and buttons exercise
Average difficulty

This Microsoft Developer RECORDING MACROS AND BUTTONS 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: Recording formatting and stripping down

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

1) Download the files needed to start this exercise: exercise-912.zip (and click here if you experience any problems unzipping this file after downloading it).
2) The above workbook contains an elephant:
Exercise screen-shot 2015 The elephant is too small, the wrong colour, has no cage and is hidden in the corner
3) Remedy the problems shown above by recording a macro to:
  • Make the elephant bigger (increase the font size to 36, say)
  • Align it centrally horizontally and vertically
  • Give it a cage (put a border round the cell)
  • Make it the right colour (make the background grey)
4) The result of all this should be a caged grey elephant:
Exercise screen-shot 2016 Much better!
5) Stop recording - you should now have a macro of at least 50 lines.  Strip out the unnecessary code to reduce it as far as possible (we can't get it below 12 lines).
6) Save this revised file as Formatted elephant.xlsm.

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..