This Microsoft Developer LOOPING OVER COLLECTIONS 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.
A full answer to this exercise is provided as part of the training course!
| 1) | Download the files needed to start this exercise: exercise-917.zip (and click here if you experience any problems unzipping this file after downloading it). | ||
| 2) | When you open the file above, you should see Elmer the elephant. It's worth noting that this picture has nothing whatsoever to do with this exercise! | ||
Elmer is a playful but responsible elephant - here seen with his duck
|
|||
| 3) | Create a macro to colour (say) A1:J10 at the top left of the worksheet in random colours from 1 to 32. | ||
|
|||
| 4) | Here is what the worksheet should look like after you run your macro: | ||
This is the effect you should get
|
|||
| 5) | If you get the macro working, try nesting it inside another loop so that the pattern is continually redrawn. Here is the outline of the code to do this: | ||
100 times is more than enough to get the idea!
|
|||
| 6) | Save this workbook as Elmer pattern.xlsm, before you do serious damage to your eyes! | ||
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.
Recommended sites: C# corner | Computer tutorials | Training classes