Excel: Creating a Code Resource for Use in Macintosh Excel

Last reviewed: November 29, 1994
Article ID: Q51093
The information in this article applies to:
  • Microsoft Excel for the Macintosh, versions 2.2, 3.0, 4.0

SUMMARY

Microsoft Excel can call routines that have been compiled as code resources (sometimes referred to as dynamic link libraries, or DLLs).

A CODE resource to be called from Excel can be created in any language that compiles the routine as a resource of type CODE. The resource must use Pascal conventions for passing arguments (this is standard).

When Excel calls a CODE resource, it first carries out the MAIN function. If no Main is defined, Excel calls the first routine in the CODE resource.

Once the routine is written, it must be defined as a CODE resource. The file type is generally XLLB, and the creator may be XCEL, but these are not required. The type must be CODE, and the ID# can be any unique ID within that file. You will also assign a name to the resource. The resource name tells Excel which CODE resource to use, as any one file can have multiple CODE resources attached to it.

The CODE resource is normally then compiled and saved to a file, but it can be attached to a document or application using utilities such as ResEdit.

MORE INFORMATION

For more information on calling CODE resources from Excel, query on the following keywords:

   description and code and resource and call and register and routine
   and problems and floating and point and decimal


KBCategory: kbusage
KBSubcategory:

Additional words: 2.2 2.20 3.0 3.00 4.0 4.00


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: November 29, 1994
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.