Microsoft KB Archive/51177

{| = Excel: Macro Commands Not Available in Both Windows/Macintosh =
 * width="100%"|

Last reviewed: October 31, 1994

Article ID: Q51177

SUMMARY
Macros written in Microsoft Excel for the Macintosh version 2.20 can have some commands that are not supported by Microsoft Excel for Windows version 2.10, resulting in an &quot;Unsupported command at cell XXXX&quot; macro run-time error.

The following macro commands in Excel for the Macintosh are not supported by Excel for Windows 2.10:

OPEN.MAIL SEND.MAIL STANDARD.FONT UNREGISTER The following macro commands in Excel for Windows 2.10 are not supported by Excel for the Macintosh 2.20: APP.ACTIVATE APP.MAXIMIZE APP.MINIMIZE APP.MOVE APP.RESTORE APP.SIZE INITIATE ON.DATA POKE PRINTER.SETUP REQUEST SEND.KEYS TERMINATE DISABLE.INPUT

MORE INFORMATION
The following are two methods for avoiding run-time macro errors:

Method 1
Turn off error checking immediately preceding the machine-specific command, and then turn error checking back on immediately following the command. For example, the following causes the error generated by the SEND.MAIL command to be ignored by Excel for Windows:

=ERROR(false) =SEND.MAIL(&quot;recipient&quot;,&quot;Report&quot;) =ERROR(true)

Method 2
Check GET.WORKSPACE(1) to determine what type of machine the macro is running on. If the macro is running on a Macintosh, GET.WORKSPACE(1) returns the string &quot;Macintosh x.xx&quot;, where &quot;x.xx&quot; is the version of the Macintosh System. This procedure can be used to determine whether or not to execute the Macintosh-specific macro command. This method leaves error checking on at all times.

For more information on GET.WORKSPACE, see page 241 in the &quot;Microsoft Excel Functions and Macros&quot; version 2.2 manual for Excel for the Macintosh.
 * }