Thursday, October 20, 2005

This weeks VBA warmup

Lately we've started familiarising ourselves with a few VBA functions such as Date(), Month(), and MonthName() (can you remember what they do? If not, look them up again or look at your examples!). Each week from now on we'll have a quick exercise that will introduce one or two VBA functions.

Note, you don't need to remember these functions! The point of these exercises is to learn to look up functions that you need and figure out how to use them from any source of help you can find! ...

Keep the Visual Basic Scripting Functions page open in a separate window while you try the following in your VBAExamples worksheet:

  1. Create a new Sub call Capitals that will ask the user to input some text (using an Input box). When you've got that working, modify your function so that after the user enters the text, it responds with a MsgBox with the exact same text but all in upper-case (capital letters).
  2. Create a new Sub call Reversi that will ask the user to enter in some text, and will respond with the text completely reversed! For e.g., if the user types in: Hi there!, your Sub will display: !ereht iH, in a MsgBox.
Of course, please help each other out when you get stuck!

0 Comments:

Post a Comment

<< Home