tlb file problem "Active X component can't create object" when used in vba routine

  • Thread starter Thread starter Keith G Hicks
  • Start date Start date
K

Keith G Hicks

I created a dll for com (in vb.net 2005) so that I could access it's
functions from an ms access app. I created the tlb file successfully. On my
dev machine I referenced it in my access app and wrote the code that uses
one of the functions. Everything ran just fine. No hiccups. The code
performed the calculation as expected. Today I went to install this on a
client workstation. I copied the tlb file into the same folder that the
access adp file sits in. I was able to set the reference without any
trouble. I was also able to use intellisense to redo some of the code taht
uses one fo the functions. But when I ran the code I got error 429 "Active
X component can't create object"

Dim dHeight As Double
Dim oHeight As New DlnpFntCalcsForCom.DlnpFntCalcsForCom

Me.NoticeTextHeight = oHeight.NoticeTextHeight(Me.FullNoticeText,
sClipFontName, dClipFontSize, dClipWidth)
Me.FolioCount = Ceiling(Me.NoticeTextHeight / 1.5) 'Ceiling is a UDF in
my app

The error occurs on line 3 in the code above.

I tried solving the problem by copying all the files in my bin/release
folder of my (dll, tlb, xml, ppb) but that didn't work either.

I read something about not having to register tlb files on the local machine
so I have not done that and found little that suggested I should or even
how. I also read something about being sure that the office app that
references the tlb file should be the same version as the one on the dev
machine. Both are running office 03 so that should not be a problem. And
lastly I found some notes from someone that suggested that the .net
framework needs to be on the workstation but followups implied that was not
necessary and it seems like nonsense to me anyway.

Does anyone have any ideas on this. I'm a bit under a crunch with this now
and need to get it working in the next 18 hours. I sure hope someone has
seen this before and knows what I need to do.

If this is more suited to the access/formscoding newsgroup, let me know. It
might be but I'm not sure. If I have to cross post over there to get this
figured out fast I will. I'm in a hurry (please don't remind me not to cross
post, I know it's frowned upon). Lots of people in the Access newsgroup
could be unlikely to look around in here.

Thanks,

Keith
 
Just FYI, since this has no answers yet I moved it to
"microsoft.public.access.formscoding"

ALthough it has occurred to me that I should probably try to create an
installation package for the tlb file. Not sure if that will help or not.
 
And what did you do with the dll ?

As the TLB is only the type library , it will give you all information
about the object and even intellisense , but it isn`t the complete
functional object
i guess you did`t install or register the dll to the target machine , also
do not forget to register this component with Regasm.exe and NOT with
regsvr32.exe

HTH

Michel
 
I somehow thought when I started this that all I needed to do was to include
the tlb file in the same folder as my adp file and then reference it. Found
out that was not even close. I then thought that I could register the files
on the server and reference them from the workstations. That didn't work
either. I ended up putting the dll on the workstation and registiering
(using regasm.exe) on each workstation. That did it. I was trying to avoid
having to install anything else on the workstations but I guess that was a
pipedream! :-) Thanks for your input. Confirms what I ended up figuring out
on my own.

Keith
 
Back
Top