CreateObject and Type Mismatch
Posted on 2000-02-22
The following piece of code is used to start up any addons to a piece of software I am working on. It gets the names of the addon from a db and then uses create object to create them. CreateObject creates the object(I can see them listed in my process list) however I get a 'Type Mismatch', when the set line gets called. The weird part is it worked a single time when the object had nothing in it. I coded what I needed and not it wont work, I even tried going back to the original empty object.
Dim AddOn() as Object
If rsAddOn.RecordCount Then
For i = 0 To rsAddOn.RecordCount - 1
Set AddOn(i) = CreateObject(rsAddOn.Fields("Name"))