Most Valuable Professional


View Jan Karel Pieterse's profile on LinkedIn subscribe to rss feed
Subscribe in a reader

Subscribe to our mailing list

* indicates required

Audit !!!

Check out our RefTreeAnalyser
the ultimate Excel formula auditing tool.

Trainings

Excel VBA Masterclass (English)
Excel VBA for Financials (Dutch)

Third party tools

Speed up your file

FastExcel
The best tool to optimise your Excel model!

What has changed?

PerfectXL Compare, for Spreadsheet Comparison
This Excel compare tool is fast, reliable, and easy to use. Compare two Excel files now and see for yourself!
Home > English site > Articles > Register UDFs > Put to Use

Registering a User Defined Function with Excel

Put to Use

Now that I've explained some of the internals of this method, let me finish by showing you how this is put to use in your project.

This requires the following steps:

Private Sub Workbook_Open()
    LoadFunctionDescriptions
End Sub

Private Sub Workbook_BeforeClose(Cancel As Boolean)
    UnLoadFunctionDescriptions
End Sub

Of course you can also use the old Auto_Open and Auto_Close subs in a normal module.

Next you fill in the details about your UDFs on the worksheet called FunctionList:

Some additional remarks:

Make sure you read the last page too, it contains an important warning!