Excel: Macro Commands Not Available in Both Windows/Macintosh

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 "Unsupported command at cell XXXX" 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("recipient","Report")
   =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 "Macintosh x.xx", where "x.xx" 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 "Microsoft Excel Functions and Macros" version 2.2 manual for Excel for the Macintosh.


KBCategory: kbother
KBSubcategory:

Additional reference words: 2.20


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: October 31, 1994
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.