It is not the aim of this manual to teach you how to write VBA scripts or macros. This can be learnt from many texts available on VBA, or on many of the core Microsoft Office products. Some assistance is also available from the online help provided with applications supporting a VBA scripting environment. However, to help you on your way we give a brief description of how to write a simple macro. To begin writing a macro you must first open the VBA development environment. In the Microsoft Office products this is generally performed via the Tools | Macro | Visual Basic Editor command. Add the following text to the content of a file open within this window.
Sub Hello()
MsgBox "Hello World"
End Sub
To run this macro, locate the cursor within the code and select the command Run | Run Sub/Userform from the main menu. You should see a simple dialog saying “Hello World”.