REGISTER.ID

Microsoft Office Excel 2003

See Also

Caution   Incorrectly editing the registry may severely damage your operating system, requiring you to reinstall it. Microsoft cannot guarantee that problems resulting from editing the registry incorrectly can be resolved. Before editing the registry, back up any valuable data. For the most recent information about using and protecting your computer's registry, see Microsoft Windows Help.

Returns the register ID of the specified dynamic link library (DLL) or code resource that has been previously registered. If the DLL or code resource has not been registered, this function registers the DLL or code resource and then returns the register ID.

REGISTER.ID can be used on worksheets (unlike REGISTER), but you cannot specify a function name and argument names with REGISTER.ID.

For more information about DLLs and code resources and data types, see Using the CALL and REGISTER Functions.

Note  Because Microsoft Excel for Windows and Microsoft Excel for the Macintosh use different types of code resources, REGISTER.ID has a slightly different syntax for each operating environment.

Syntax 1

For Microsoft Excel for Windows

REGISTER.ID(module_text,procedure,type_text)

Syntax 2

For Microsoft Excel for the Macintosh

REGISTER.ID(file_text,resource,type_text)

Module_text    is text specifying the name of the DLL that contains the function in Microsoft Excel for Windows.

Procedure    is text specifying the name of the function in the DLL in Microsoft Excel for Windows. You can also use the ordinal value of the function from the EXPORTS statement in the module-definition file (.DEF). The ordinal value or resource ID number must not be in text form.

Type_text    is text specifying the data type of the return value and the data types of all arguments to the DLL. The first letter of type_text specifies the return value. If the function or code resource is already registered, you can omit this argument.

File_text    is text specifying the name of the file that contains the code resource in Microsoft Excel for the Macintosh.

Resource    is text specifying the name of the function in the code resource in Microsoft Excel for the Macintosh. You can also use the resource ID number. The ordinal value or resource ID number must not be in text form.

Examples (32-Bit Microsoft Excel)

The following formula registers the GetTickCount function from 32-bit Microsoft Windows and returns the register ID:

REGISTER.ID("Kernel32", "GetTickCount", "J!")

Assuming that GetTickCount was already registered on another sheet using the preceding formula, the following formula returns the register ID for GetTickCount:

REGISTER.ID("Kernel32", "GetTickCount")

Examples (16-Bit Microsoft Excel)

The following formula registers the GetTickCount function from 16-bit Microsoft Windows and returns the register ID:

REGISTER.ID("User", "GetTickCount", "J!")

Assuming that GetTickCount was already registered on another sheet using the preceding formula, the following formula returns the register ID for GetTickCount:

REGISTER.ID("User", "GetTickCount")