Recorded Macros: A First Look at the VBA Language

William Preinitz · 2012

This chapter demonstrates the use of Record New Macro facility of Excel to record a simple macro. It shows how to compile and read the code with the idea of streamlining it, and demonstrates use of visual basic application (VBA) to modify the Excel environment. This ability is crucial when developing the reporting package of the model. A “proto” model is then written in VBA code that builds on the functionality of the recorded macros. This model has a menu that contains information the program needs to run. Using the menu information, the model opens a data file and reads the file's information into the computer's memory. The model uses this information to perform a simple set of spreadsheet calculations. It opens an output file that contains a simple report and populates the output file with the results of the computation. The file is closed and saved and then model ends.

Read the paper · More papers on PaperTik