Three types of macros have been developed in Minitab to perform various repetitive tasks easily and effectively. In Minitab's documentation, you may see the following terms which distinguish between the three types of Minitab macros:
Global macros, also referred to as simple macros, refers to the simplest form of macro.
Local macros, also referred to as advanced macros, refers to the more sophisticated form of macro.
Execs refers to an older form of Minitab macro.
Similarities between Local and Global Macros
Worksheets include all of the data contained in the Session window, the Data window, and the Worksheet folder for a particular file. While most menu and session commands use only one worksheet, macros use two different kinds of worksheets. Both local and global macros work with a global worksheet, but only local macros work with both a global worksheet and a local worksheet.
- The "global worksheet" (sometimes called the "regular worksheet") is whatever worksheet is current when you invoke the global macro. The global worksheet consists of more than just the columns of data you see in the Data window-it is all the columns, constants, and matrices you see listed in the Worksheet folder for that worksheet. Global macros act directly on the global worksheet.
- The "local worksheet" is created when you invoke the macro, and is deleted from your computer's memory when the macro finishes. The local worksheet is completely separate from the global worksheet, and is not visible in a Data window. Only the macro can "see" and manipulate the variables in that worksheet-which is why the worksheet is said to be "local" to the macro. You can write your macro to use arguments, so that you can pass variables from the global worksheet to the local worksheet when you invoke the macro, and pass variables out of the local worksheet into the global worksheet when the macro finishes.