Practical Financial Modelling : A Guide to Current Practice

Macros are predefined sequences of commands and events that the user can run as required, and are typically used to execute repetitive or complex tasks. They can either be recorded, which requires the user or developer to carry out the appropriate command sequence first, or they can be written using the Visual Basic Editor in Excel. Visual Basic is the macro command language used in Microsoft products.
In the early days of spreadsheets, the first macro commands were easily learned and applied by the expert spreadsheet modeller. Lotus 1 2 3 release 3, for example, had some eighty commands. It was a straightforward task to both write and debug the code. With the introduction of Windows the situation grew rather more complex. Both Lotus and Microsoft introduced macro languages (Lotus Script and a form of Visual Basic, respectively) which were considerably more advanced, and allowed for the creation and use of dialog boxes, as well as offering the ability to interrogate other applications for information. Although these languages and their successors could be learned by the expert user, their inherent complexity meant that the writing of macro code became a task better suited to the programmer, rather than the modeller.
However, some modellers believe that a model is not finished unless it has a library of macros. Certainly there are times when the use of macros is unavoidable, but using the principle of error reduction, their use should be limited. Programmers are trained to write code, and have systems and methodologies...