Main Content

MLAutoStart

Automatically start MATLAB

Description

example

= MLAutoStart(flag) sets automatic startup of the Spreadsheet Link™ and MATLAB® software. A change of state takes effect the next time an Excel® session starts. Use this syntax when working directly in a worksheet.

MLAutoStart flag sets automatic startup of the Spreadsheet Link and MATLAB software. A change of state takes effect the next time an Excel session starts. Use this syntax in a VBA macro.

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

Examples

collapse all

Enter this command in a worksheet:

MLAutoStart("no")

Spreadsheet Link and MATLAB do not start on subsequent Excel session invocations.

Input Arguments

collapse all

Either "yes" or "no".

Specify "yes" to automatically start the Spreadsheet Link and MATLAB software every time a Microsoft® Excel session starts. Specify "no" to cancel automatic startup of the Spreadsheet Link and MATLAB software.

Output Arguments

collapse all

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

Tips

  • If Spreadsheet Link and MATLAB are running, then MLAutoStart("no") does not stop them.

  • To work with VBA code in Excel with Spreadsheet Link, you must enable Spreadsheet Link as a reference in the Microsoft Visual Basic® Editor. For details, see Installation.

Version History

Introduced before R2006a