To Save a Page as a Macro

Download Instructions

  1. Select or highlight the code for the macro, beginning with the word "macro" or "gmacro", and ending with "endmacro".
  2. Right click and choose Copy.
  3. Open Microsoft Notepad and choose Edit > Paste.
  4. Scroll to the bottom and ensure that "endmacro" is the only text on the last line.
  5. Choose File > Save As and type the file name in double-quotes including the .mac extension, like "GRUBBS.MAC".  The name of the macro is typically listed below the "macro" line in the body of the macro.
  6. Save the file into your Minitab macros folder.

Note: If you don’t already have a Minitab Macros folder in your My Documents folder, create a new folder in your My Documents folder. Name this new folder Minitab Macros. Save your Minitab macros to this folder. To make this folder the default macro location, in Minitab, choose Tools > Options > General. In Macro location, browse to the Minitab Macros folder. Minitab will look in this folder first for macros when a macro is launched.

General Instructions

To view specific directions for running the individual macros, open the macro file in Notepad. For example, the macro that performs Grubb’s test to identify outliers, GRUBBS.MAC, contains the instructions: “Suppose the data is in C1. To run the macro, choose Edit > Command Line Editor and type the command %GRUBBS C1 and click on Submit Commands.”

For ease of use, associate the file extension .MAC with Notepad. The next time you double-click a macro file, it will open in Notepad.

You can run the macros from either the command prompt, MTB >, in the Session window or from Edit > Command Line Editor. To enable the command prompt in the Session window, click anywhere in the Session window to make it the active window, and then choose Editor > Enable Commands. To use the Command Line Editor at any time, choose Edit > Command Line Editor.

Note: Several of the macros require user-supplied input. These macros must be run with the command prompt enabled. To permanently enable the command prompt so that command language is enabled every time you launch Minitab, do the following:

  1. Choose Tools > Options > Session Window > Submitting Commands.
  2. Under Command Language, choose Enable.
  3. Click OK.

If you still have questions, you can e-mail us. 

Return to the Macros Library 

Need Assistance?

+44 (0)24 7643 7507