Microsoft Visual Basic
Recording macros and buttons exercise

This Microsoft Visual Basic 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: Maze -Recording 2007

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

1) Download the files needed to start this exercise: exercise-967.zip (and click here if you experience any problems unzipping this file after downloading it).
2) Open the file found in the folder above.
3) Record 4 macros to work as follows:
  • A new macro called Down, such that when you press CTRL + SHIFT + D the macro takes you down one cell.
  • A new macro called Up, such that when you press CTRL + SHIFT + U the macro takes you up one cell.
  • A new macro called Left, such that when you press CTRL + SHIFT + L the macro takes you left one cell.
  • A new macro called Right, such that when you press CTRL + SHIFT + R the macro takes you right one cell.
4) Test your macros out by starting in cell B2 and pressing the appropriate sequence of keys:
Exercise screen-shot 2294 The first sequence of keys is:CTRL + SHIFT + D
5) Now record a fifth macro called Cheat, which takes you straight to the cell containing the gold, regardless of your current starting position.
Training exercise hint Think carefully about whether you should be recording in relative or absolute mode.
6) Add some buttons to your workbook to make these macros easier to run:
Exercise screen-shot 2295 The buttons do not have to be perfectly aligned.
7) Save your amended workbook as Maze with Macros & 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 � Wise Owl Business Solutions Ltd 2007.  All rights reserved.  Design by Branches.