This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


Return standard Spreadsheet Link errors or full MATLAB errors using MLEvalString


MLShowMatlabErrors flag
out = MLShowMatlabErrors(flag)


MLShowMatlabErrors(flag) sets the Spreadsheet Link™ error display mode when executing MATLAB® commands using MLEvalString. Use this syntax when working directly in a worksheet.

MLShowMatlabErrors flag sets the Spreadsheet Link error display mode when executing MATLAB commands using MLEvalString. Use this syntax in a VBA macro.

out = MLShowMatlabErrors(flag) lets you catch errors when executing MLShowMatlabErrors in a VBA macro. If MLShowMatlabErrors fails, then out is a string containing error code. Otherwise, out is 0.

Input Arguments


Either "yes" or "no".

Specify "yes" to display the full MATLAB error message upon MLEvalString failure. Specify "no" to display the standard Spreadsheet Link errors upon MLEvalString failure.

Default: "no"

Output Arguments


0 if the command succeeded. Otherwise, a string containing error code.


collapse all

Switch to displaying standard Spreadsheet Link errors, such as #COMMAND, on MLEvalString failures:


Switch to displaying MATLAB errors, such as ??? Undefined function or variable 'foo', on MLEvalString failures:


See Also

Introduced in R2006b

Was this topic helpful?