You can use the undocumented ZERROR command in the exec.
For example, suppose the exec contains the following commands:
RAND 10 C1 DESS C1 RAND 10 C2 DESC C2
If you try to run this exec you will get the following error message in the Session window and the exec will stop running:
* ERROR * Unknown Minitab command: DESS
If you add the ZERROR command to the exec as shown below, you will still get the error message in the Session window, but the exec will continue to run.
RAND 10 C1 DESS C1 ZERROR RAND 10 C2 DESC C2
This error message appears when you try to run a macro that uses the GSAVE subcommand to save a graph to a nonexistent path. Correct the path specified in the GSAVE subcommand, then resave the macro. The macro should run.
Here are two possible explanations.
Problem 1 - Minitab cannot find the macro.
You have several options to fix this problem.
Problem 2 - The macro is not saved as a text file with the appropriate .MAC file extension.
If the macro is saved in the correct folder, and you get the same error message when you try to run the macro, then do the following:
Or, for File name, put the name of the macro with the .MAC extension (for example, MYMACRO.MAC), and for Save as type, select All Files.
If the macro is in the Macros folder and has the .mac file extension, to quickly run the macro without getting the message, in the Command Line Editor, include the file path with the file name, as follows:
Now you can run the macro and the message will not appear.
Make sure that the application that you used to write or modify the macro in is not open. For example, if you wrote or modified the macro in Microsoft Word, and Microsoft Word is still open, close Microsoft Word.
As a work-around, you can use an Exec to call up each worksheet and then the macro in turn. Suppose, for example, you want to run a local macro called "MyLocal" on two worksheets named "Week1" and "Week2". Here is an example of what the exec could look like:
Worksheet "Week1" %MyLocal Worksheet "Week2" %MyLocal
These errors will appear when you try to run a local or global macro written in Microsoft Word if the macro is not saved in "Text only (*.txt)" format. Below are two ways to save the macro file written in Microsoft Word in "Text only (*.txt)" format:
If you get a message that the file "may contain features that are not compatible with Text Only format. Do you want to save the document in this format?" click Yes.
To open Notepad, click on the Start menu and choose .
The GSTD command must have been issued. The GSTD command enables character (standard) graphics, and thus disables high-resolution (professional) graphics. To return to professional graphics, at the command prompt (MTB >) in the Session window, type:
To display the command prompt, activate the Session window and choose.
If the macro does not prompt the user for input and you are getting this error message, verify that the macro is being called using appropriate commands and subcommands.