Well, I can't imagine that you have that many class modules?
Perhaps 10 max?
If you have a lot, then I suspect there is some design issue at play that
could be done differently?
Since there can't be that many, then build your own "get" function. You will
have add one line of code for each time you add a new class object, but that
for a typical application not going to be much extra code..
eg:
Public Function MyGetClass(strClass As String) As Object
Select Case strClass
Case "clsBook": Set MyGetClass = New clsBook
Case "foo": Set MyGetClass = New foo
End Select
End Function
Then in code go:
Dim c As Object
Dim strC As String
strC = InputBox("what class")
Set c = MyGetClass(strC)
Not a pretty solution like your asking for, but since one is not likely to
have many class modules, then the above should be workable...