Microsoft Visual Basic
Recording macros and buttons exercise
Harder than average 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: Recording adding another period

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

1) Download the files needed to start this exercise: exercise-913.zip (and click here if you experience any problems unzipping this file after downloading it).
2) Professor Dumbledore keeps his budget in Excel, and wants to be able to click on a button to add another period each month:
Exercise screen-shot 2017 What the spreadsheet should look like after clicking on the button shown
3) Help Professor Dumbledore fulfil his wishes by:
  • Recording a macro to accomplish the task shown, using a suitable combination of absolute and relative recording (and indeed the hint below)
  • Adding a button as shown and attaching this macro to it
4) Note that you are allowed to edit the macro after you've recorded it.
Training exercise hint Your macro might, for example, select period 1 using absolute references, then switch to relative cell references to go to the end of the row of data, etc.
5) Save this as Adding period.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 � Wise Owl Business Solutions Ltd 2007.  All rights reserved.  Design by Branches.