There are a couple of things that could cause the "Class not registered" error -
- Do NOT build your class library for AnyCPU. If you are using a 64-bit version of Office then build for x64. If 32-bit then build for x86. This will ensure that Visual Studio performs COM registration in the appropriate registry locations.
- Make sure that you have checked the boxes in the project properties to "Register for COM interop" and "Make assembly COM-Visible".
- When building your project run Visual Studio as an Administrator with elevated privileges. This is required for successful COM registration. If you do not run it as an Administrator the class library will be created but COM registration will fail.
In your Office application VBA Editor Tools->References find your project "ComTest". You must check the box for Intellisense to work.