Add a shortcut to a menu or toolbar to run a Minitab macro or Exec file

If you frequently use a Minitab macro or Exec file, for example, to update data from a database, you can add a button to a menu or toolbar to run the macro or exec.

  1. Choose Tools > Customize.
  2. Click the Tools tab.
  3. Click the New (Insert) button .
    The New (Insert) button is circled.
  4. Type a name for the command, then press the Enter key, for example, type Get My Data.
    The command name is selected.
  5. Click the Open button .
    The Open button is circled.
  6. From the file type drop-down list, choose All Files (*.*).
  7. Navigate to the macro or Exec file (for example, GetMyData.mtb) and then double-click the file name.
  8. If the macro requires users input when it is run, then specify the arguments required by the macro by entering columns, constants, or matrices after Arguments.

    You can only specify one set of arguments. 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 a different shortcut with the other arguments. For example, suppose you enter a percentile to invoke a macro. You run it one time specifying the 95th percentile (for example, C1 95 C10) and then again specifying the 90th percentile (for example, C1 90 C11). You could create a shortcut named 95th Percentile using 95 as an argument, and then create a second shortcut named 90th percentile using 90 as an argument.

  9. Click Close.
    You can run the macro at any time by choosing it from the Tools menu, for example, choose Tools > Get My Data.
  10. To add the shortcut to a different menu or to a toolbar:
    1. Choose Tools > Customize.
    2. On the Commands tab under Categories, choose Tools.
    3. Drag the new command (for example, Get My Data) to the location on the Minitab menu or toolbar.
  11. To edit the button display, with the Customize dialog box open, right-click the button on the menu or toolbar and choose an editing option.
  12. Click Close.
  13. Run the macro or exec by clicking the new button or choosing the item from the menu.
By using this site you agree to the use of cookies for analytics and personalized content.  Read our policy