Go to project properties and one of the options will be to make and ActiveX Dll.

Once you have compiled the DLL and it is registered you can then reference it as you would any other DLL or class etc