Not long ago (ha ha) I did a post on the CALL() function. I mentioned then I would also cover CALLs sibling function REGISTER.

I’ve put it on Codematic here.

REGISTER is similar to CALL in that it allows easy access to code resources in dlls. The advantage of REGISTER is that once you have registered your dll function with Excel you don’t need to pass through a macro sheet or VBA.

The other great thing about REGISTER is if you get a totally clear understanding of it it makes converting dlls to xlls more achievable. This is exactly the function you use inside an xll to register your functions when your xll add-in is opened by Excel.

If you are interested in xll development I strongly recommend learning about REGISTER. Effectively an xll is simply a dll with the REGISTER functions embedded in it.

The page on Codematic shows both the XLM way and the VBA way to use REGISTER, just because the XLM is easier to understand (IMO).

I did manage to corrupt my workbook so that opening the function wizard crashed Excel, but I think that is because of all the messing I was doing. I will retest.

All feedback welcome as usual, especially from anyone using this sort of approach in production.



One Response to “Excel REGISTER()”

  1. Raw xlls « Smurf on Spreadsheets Says:

    […] part in VBA or XLM, and once its registered it can be called directly from cells. I covered REGISTER() here. Or you can embed that code in the xll using the xlAutoOpen routine to call Excel4 with […]

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: