To view the sort macro in the Visual Basic Editor, press Alt and F 11. This is a lot faster than the altemative of using Tools, Macro, Macros to launch the Editor from within the Macros dialogue box. Like all macros, this one begins with a Sub line in which the name of the macro is declared and ends with an End Sub line.

What lies in between is the macro itself, which may also contain explanatory text that is ignored by Visual Basic provided it is preceded by a single quote on each line on which it occurs. In programming terms a macro is a subroutine, which can be invoked by a human operator (by means ofa keystroke, for example) or from within other macros.

When typing in lines of code, the Visual Basic Editor adds spaces and capitalisation where necessary to maintain a unifOlm layout. To quit the Editor and retum to Word use Alt and Q or the Close option from under the File menu.

Name:  Visual basic editor in word.jpg
Views: 361
Size:  41.8 KB