Microsoft KB Archive/51091

{| = Excel: CALL and REGISTER Functions Return #VALUE =
 * width="100%"|

Last reviewed: November 2, 1994

Article ID: Q51091

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

The REGISTER function returns #VALUE! if the code is not successfully registered. Calling an unsuccessfully registered function likewise returns #VALUE!. You can see if a CODE resource has been successfully loaded into memory by viewing the macro sheet with display formulas turned off. If the code has been loaded, the REGISTER function returns a text string used by the CALL function.

A CODE resource may not load for any of the following reasons:


 * 1) The file containing the CODE resource is not in the specified directory. Excel looks for the file containing the CODE resource in the active directory if no path is specified. To ensure that the resource is found, always specify the path to the file containing the resource. Also, make sure the first argument in the REGISTER function is enclosed in quotation marks and is the name of the file containing the resource, not of the resource itself.
 * 2) The routine has not been compiled as a CODE resource. Check that the routine has been compiled as a resource, with type CODE (all caps). Also check the spelling of the name of the resource and make sure it is enclosed in quotation marks. Finally, verify that the second argument in the REGISTER function is the name given to the resource when setting the project type, not the name of the project, source file, or file containing the resource.

For more information on CODE resources, query on the following words: description and creating and code resource and call register and routine and floating point and decimal
 * }