Home Article index Newsletter

Deze pagina in het NederlandsHome > Article index > Register UDFs >

Registering a User Defined Function with Excel

Setting Things Up

Putting this method to use is fairly simple if one uses the workbook which can be downloaded here.

The workbook uses a table on sheet FunctionList, which all details of all UDFs can be entered:

Screenshot of worksheet table to set function details for the registration

Row 7 of this table is prefilled with function names of User32.dll which seem to be rarely used. Of course you can use any other dll here, with its accompanying functions.

Note that the worksheet has been protected (no password was set) to avoid accidental changes to fixed information and that rows 28-65536 are hidden.

The rest of the work is done using some XL4 macro code and some VBA code, as described on the next pages.