Chapter 10

VBA Subroutines

Publisher Summary

This chapter discusses Visual Basic for Applications (VBA) subroutines. One can record a short macro to learn the syntax of a particular operation and paste the result into a larger subroutine. The words macro and subroutine are almost synonymous. If a macro called Alpha is recorded, VBA will create a subroutine with the same name. If one uses the command View Macros Alpha is seen within the macro list. Perhaps the subroutine Alpha calls subroutines Beta and Gamma, and function Kappa. Then the entire group constitutes the macro Alpha. Generally, these would be kept on a single module sheet. There is a special class of macros called event macros that are associated with either a specific sheet or with ...

Get A Guide to Microsoft Excel 2007 for Scientists and Engineers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.