Documentation

This is machine translation

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

MLShowMatlabErrors

Return standard Spreadsheet Link errors or full MATLAB errors using MLEvalString

Syntax

MLShowMatlabErrors(flag)
MLShowMatlabErrors flag
out = MLShowMatlabErrors(flag)

Description

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

flag

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

out

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

Examples

collapse all

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

MLShowMatlabErrors("no")

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

MLShowMatlabErrors("yes")

See Also

Introduced in R2006b

Was this topic helpful?