Now that I understand your question, a central library of sorts may be your best option, there are others but I'm always a fan of libraries.
To achieve this:
- Create a new workbook, import all of your class modules in to the VBA project in that workbook. Name your project something like MyCentralLibrary (something different than VBAProject)
- Set the class module's Instancing Property to PublicNotCreatable
(change this in the properties window)
Now here comes the slightly
stupid part (I never was a fan of VBA). Projects referencing this
library will be able to see all the classes but never instantiate a
new instance of them. So what you'll have to do is for each class you put in the library,
write a function with the class as the return type, like so:
Public Function GetMyClass() As MyClass
Set GetMyClass = New MyClass
End Function
Now in the project you want to reference your central library. Go to Tools -> References and choose your library name from the list. Now you can instantiate classes from that library in your project like so:
Public c As MyCentralLibrary.MyClass
Set c = MyCentralLibrary.GetMyClass()
Again, there's other ways of doing it, but I'm always a proponent of libraries (at least in other languages)
As a note, if/when you move between computers,, you'll obviously have to move the workbook with your library in it around and re-do the references for any projects referencing the library on the new computer.
My two cents, if this were to scale more I'd go ahead and grab the free version of Visual Studio and turn this into a class library that can be referenced from Excel. But that's just me and my dislike of VBA shining through ;).