WISE OWL EXERCISES
ADVANCED VBA EXERCISES
Advanced VBA | Working with shapes exercise | Substituting arrows for directions in a maze using autoshapes
This exercise is provided to allow potential course delegates to choose the correct Wise Owl Microsoft training course, and may not be reproduced in whole or in part in any format without the prior written consent of Wise Owl.
The answer to the exercise will be included and explained if you attend the course listed below!
You need a minimum screen resolution of about 700 pixels width to see our exercises. This is because they contain diagrams and tables which would not be viewable easily on a mobile phone or small laptop. Please use a larger tablet, notebook or desktop computer, or change your screen resolution settings.
Open the workbook in the above folder. It contains an all-too-familiar maze.
Red Riding Hood is finding the directions a little hard to follow. Write a macro which loops over all of the cells in the maze shown shaded:
Your macro should check each cell in the range E4:G9.
For each cell, substitute arrows as follows:
|Contents of cell||Substitute|
|R||Autoshape number 33|
|L||Autoshape number 34|
|U||Autoshape number 35|
|D||Autoshape number 36|
The trick, of course, is positioning the arrows so that they look sensible. Here's what the final maze might look like after running your macro:
When you've got this working, save the workbook as Putting arrows in maze, then close it down.