Microsoft KB Archive/51093

{|
 * width="100%"|

Excel: Creating a Code Resource for Use in Macintosh Excel

 * }

-

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 Additional query words:

Keywords :

Version :

Platform :

Issue type :

Technology :