How can I open Minitab and run a Minitab exec macro from a DOS prompt?

Suppose Minitab is installed to C:\Program Files\Minitab\Minitab 17. To open Minitab and run an exec macro via a DOS prompt, do the following:

  1. Save your exec (.MTB) file in the default file location.

    To view or change the default file location, choose Tools > Options.

  2. Choose Start > All Programs > Accessories > Command Prompt to open the DOS prompt.
  3. Type C: and then press Enter.
  4. Type cd Program Files\Minitab\Minitab 17 and then press Enter.
  5. Type mtb.exe ExecName.mtb and then press Enter.

    It may take a few seconds for Minitab to open and for the macro to run.

When I perform tasks using Minitab, commands appear in the Session window along with my output. Can I change this so that only the output appears?

You can stop session commands from being displayed by disabling the command language.

To disable command language for the current session:

  1. Activate the Session window.
  2. Choose Editor > Enable Commands.

    You can also set your preferences so that command language is always disabled. Choose Tools > Options > Session Window > Submitting Commands.

How can I add a macro to the Tools menu?

  1. Choose Tools > Customize.
  2. Click the Tools tab.
  3. Click for New (Insert).

    If you hold the pointer over the button, the ToolTip displays New (Insert).

  4. Enter the name for the menu or toolbar, then press Enter. For this example, type My Analysis.
  5. To view the Open files dialog box, click the button to the right of the Command field.
  6. From Files of type, choose All Files (*.*).
  7. Navigate to the .mtb or .mac file, then double-click the file.

    If the macro is a local macro, specify the arguments required by the macro by entering columns, constants, or matrices after Arguments. Note that this functionality (i.e., running the macro by clicking on the shortcut from the menu or the toolbar) requires a specific set of arguments for the shortcut. If you want the macro to run with a different set of arguments, you need to either modify the arguments for the shortcut or create another shortcut with the different arguments. For example, suppose you enter a percentile to invoke a macro. You run it once specifying the 95 th percentile (e.g., C1 95 C10) and then again specifying the 90 th percentile (e.g., C1 90 C11). You could create a shortcut named 95 th Percentile using 95 as an argument, and then create a second shortcut named 90 th percentile using 90 as an argument.

  8. Click Close.

    Now you can run the macro by choosing Tools > My Analysis.

How can I move a macro from the Tools menu to another menu or toolbar?

  1. Choose Tools > Customize.
  2. On the Commands tab, under Categories, choose Tools.
  3. Drag the macro to the desired place on the menu or the toolbar.

    To change the text and image displayed on the toolbar, right-click the button or text while the Tools > Customize dialog box is still open. You can select Image, Text, or Image and Text. To change the image that is displayed, choose Edit Button Image.

How can I use MyMenu to customize Minitab's interface? For example, how can I create custom dialog boxes that will run my own macros?

Creating dialog boxes requires programming expertise. You will need to use a programming language such as Visual Basic or C++ to create a *.dll that adds a custom dialog box to Minitab. For more information on how the customization features work, refer to the Minitab Automation Help file, which is accessible as follows:

  1. Browse to C:\Program Files\Minitab\Minitab 17\Resources\1033
  2. Double-click MTBAUTO.CHM to view documentation for COM and MyMenu.

How can I create a keyboard shortcut to enable or disable Minitab command language?

  1. Choose Tools > Customize.
  2. Click the Keyboard tab.
  3. From Category, choose Session Editor Menu.
  4. Under Commands, choose Enable Commands.
  5. In Press New Shortcut Key, click to insert your cursor, then press Ctrl+Q.
  6. Click Assign and close the window.
By using this site you agree to the use of cookies for analytics and personalized content.  Read our policy