Board index » delphi » _Collection, Visual Basic, "Class not registered"

_Collection, Visual Basic, "Class not registered"

I am using an ActiveX Type Library for a project I am working on.

My problem is that I need to call a method that expects a _Collection as a
parameter.  I imported the msvbvm60.dll which created (VBA_TLB) which had
the _Collection class that I was looking for.

However, if I try to create an instance of this class:

var
  foo : _Collection;
begin
  foo := CoCollection.Create;
end;

I get the error (class not registered).

I've registered this class a few times (Import type library does it, I've
used tregsrv and regsrv32) all to no avail.

Surely someone has had this problem before...I can't seem to figure it out
though!  (I've combed the web and google and there don't seem to be any
answers to this question!?!)  I am guessing there is some kind of
workaround...

Any help is appreciated.

Thanks.

John.

 

Re:_Collection, Visual Basic, "Class not registered"


<<John:
My problem is that I need to call a method that expects a
_Collection as a parameter.

Quote

Not all COM objects are CoCreatable - in fact, relatively
few are. Usually there is just one Application object (or
equivalent), and you access all other interfaces using its
methods and properties.

--
Deborah Pate (TeamB) http://delphi-jedi.org

  TeamB don't see posts sent via Google or ISPs
  Use the real Borland server: newsgroups.borland.com
  http://www.borland.com/newsgroups/genl_faqs.html

Other Threads