Microsoft Visual Basic
Messages and variables exercise
Relatively easy

This Microsoft Visual Basic MESSAGES AND VARIABLES 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: Simple name macro - asks for name, repeats back

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

1) Create a new workbook.
2) Write a macro which displays two input boxes in succession (you'll also need to create two separate variables to hold the answers).  Firstly, to ask your user to type in their name:
Exercise screen-shot 2005 So far, so inoffensive
3) The second input box should ask a bit more personal information about your user:
Exercise screen-shot 2006 There is no accounting for taste
4) Finally, display back to the user the results of their choices:
Exercise screen-shot 2007 You can use MsgBox to display the text, and the & symbol to join bits of text together
5) Save this file as Doubtful taste example.xlsm, then 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.