Recording Macros - Automatic Programming
Statistica provides a comprehensive selection of facilities for recording macros to automate repetitive work or to be used as a means to automatically generate programs for further editing and modification. The macro (Statistica Visual Basic) programs recorded by these facilities can be saved to be run "as is," or they can be used as the "building blocks" for more complex and highly customized Visual Basic application programs.
There are three categories of macros that can be automatically created as you run Statistica:
Also, your choice of data files, as well as case selection conditions and the weight variable, are recorded as long as those options are selected in the analysis dialog (not from the File menu or the status bar). One such "stand alone" macro is created for each analysis and these macros are not "put together" automatically by Statistica (in fact they cannot be "mechanically" combined without some editing since each of them represents a stand-alone program that starts with the appropriate declarations, etc.).
The recording of Analysis Macros begins automatically whenever a new analysis is started from the Statistics or Graphs menu. Anything that "happened" before that is not recorded in the Analysis Macro. Thus, your specific selection of the input data file is not recorded (the Analysis Macro always assumes that it is to be executed on the current active input data file) unless that choice is made by clicking the Open Data button on the respective analysis dialog. Neither are any operations recorded that you may perform on the input data file, such as sorting the data, subsetting of variables and/or cases, etc.
The most common application of the Master Macro would be to start Statistica, start the Master Macro recording by selecting Start Recording Log of Analyses (Master Macro) from the Tools - Macro menu, and then continue with the analyses. For example, you can compute descriptive statistics, perform some multiple regression analyses, make several histograms and scatterplots, etc. Note that during the analysis, you will see the floating Record toolbar to remind you that you are currently recording a Master Macro.

Finally, you stop the recording by either clicking the stop button
on the floating Record toolbar or by selecting Stop Recording from the Tools - Macro menu. At that point, the Visual Basic program that represents all actions performed or selections made during the Master Macro recording will be transferred into a Statistica Visual Basic editor window. When you run this macro "as is," the exact same analyses will be repeated (with some exceptions resulting from the logic of creating reusable programs from sequences of interactive operations performed by the user, described below).
When you stop the recording by either clicking the stop button
on the floating Record toolbar (see above) or by selecting Stop Recording from the Tools - Macro menu, a Statistica Visual Basic editor window will open with typically a very simple program containing a single SendKeys command with symbols that represent all the different keystrokes you performed during the recording session.
All three follow the identical syntax and can be modified at a later time, but because of the different ways in which each of them is created, they offer distinctive advantages and disadvantages for specific applications.
Recording Simple Macro (SVB) Programs, Documenting an Analysis