Deployment with DLL/TLB reference (1 Viewer)

GBalcom

Much to learn!
Local time
Today, 12:10
Joined
Jun 7, 2012
Messages
459
Hello,
Having trouble in Access 2013, deploying an application that references a .tlb file. I've successfully registered the .dll file on the deployment computer, and made sure it was the same file path as my dev computer. Both the .dll and the .tlb are there. This was necessary to access the .net library for Google calendar.

The .dll and .tlb are in both the system32 and SYSWOW64 folders. I made a quick little app to test this functionality. It has one button, which when depressed calls a function in the tlb file.


When opening this test app on the computer I'm deploying to, I get the following message:

Automation Error: The system cannot find the file specified. :banghead:

Any tips appreciated!

Forgot to mention that the deployment will use Access 2013 runtime.
 
Last edited:

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 03:10
Joined
May 7, 2009
Messages
19,231
maybe you need to register it manually using regsvr32
 

GBalcom

Much to learn!
Local time
Today, 12:10
Joined
Jun 7, 2012
Messages
459
Arnelgp,
I'm looking into that avenue now. Thanks. I've also pushed it back on the dev to supply me with deployment instructions. It's frustrating I got it to work on my machine, but not on others. I've read mixed feedback from a google search. Some say it's possible to reference a .tlb with access runtime, others say it's not. :banghead:
 

GBalcom

Much to learn!
Local time
Today, 12:10
Joined
Jun 7, 2012
Messages
459
Hmm.. Can anyone confirm if you can reference a .net dll or .tlb from an application that is run in the runtime environment? I'm using Access 2013 to develop, and 2013 runtime.

My error has changed to the following: ActiveX component not able to create object.
 

CJ_London

Super Moderator
Staff member
Local time
Today, 20:10
Joined
Feb 19, 2013
Messages
16,606
not sure if it is relevant, but access runtime cannot create new objects (e.g. forms/reports/controls). The object needs to pre-exist and then runtime can modify it as required
 

theDBguy

I’m here to help
Staff member
Local time
Today, 12:10
Joined
Oct 29, 2018
Messages
21,453
Hmm.. Can anyone confirm if you can reference a .net dll or .tlb from an application that is run in the runtime environment? I'm using Access 2013 to develop, and 2013 runtime.

My error has changed to the following: ActiveX component not able to create object.
Hi. As CJ said, runtime can use an external reference but cannot create a new object from it. It can certainly use methods or procedures provided by the reference to manipulate existing objects.
 

GBalcom

Much to learn!
Local time
Today, 12:10
Joined
Jun 7, 2012
Messages
459
Ok, here is my calling code. This is working on my dev machine.

PHP:
Dim gc As GoogleCal
Dim EventId As String
Set gc = New GoogleCal


MsgBox gc.GetInfo

Set gc = Nothing

Do you see anything that would prevent this from working in a runtime environment?
 

theDBguy

I’m here to help
Staff member
Local time
Today, 12:10
Joined
Oct 29, 2018
Messages
21,453
Ok, here is my calling code. This is working on my dev machine.

PHP:
Dim gc As GoogleCalDim EventId As StringSet gc = New GoogleCalMsgBox gc.GetInfoSet gc = Nothing
Do you see anything that would prevent this from working in a runtime environment?
Based on that, I don't see anything that can obviously cause an error/problem. Are you able to test it?
 

GBalcom

Much to learn!
Local time
Today, 12:10
Joined
Jun 7, 2012
Messages
459
Hi DBguy,
Yes, the code is working fine on my dev machine (A2013), but when I run it on my test machine (A2013 runtime), it gives me the "ActiveX component cannot create object" error.
 

GBalcom

Much to learn!
Local time
Today, 12:10
Joined
Jun 7, 2012
Messages
459
I just commissioned the developer to build out a .msi, that will hopefully handle all the registration on our test machine, then our server to get it right.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 12:10
Joined
Oct 29, 2018
Messages
21,453
Hi DBguy,
Yes, the code is working fine on my dev machine (A2013), but when I run it on my test machine (A2013 runtime), it gives me the "ActiveX component cannot create object" error.
Try renaming your ACCDB to ACCDR and try again on your machine.
 

CJ_London

Super Moderator
Staff member
Local time
Today, 20:10
Joined
Feb 19, 2013
Messages
16,606
just out of curiosity - does it work if you run the app on your machine in runtime mode? (change file extension from .accdb to .accdr)
 

GBalcom

Much to learn!
Local time
Today, 12:10
Joined
Jun 7, 2012
Messages
459
Hi Everyone,
Just to close the loop. I had tested it by renaming the file extension from .accdb to .accdr and opening on my dev machine. It did work in runtime mode fine on mine.

I ended up paying the developer a bit extra and he made me a .msi that I simply ran to install and register the .tlb file. It worked on all 3 computers just fine. The very interesting thing is, once ran, I was able to find the .tlb in the list of references under tools....in other words, I didn't have to go browse for it anymore.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 12:10
Joined
Oct 29, 2018
Messages
21,453
Hi Everyone,
Just to close the loop. I had tested it by renaming the file extension from .accdb to .accdr and opening on my dev machine. It did work in runtime mode fine on mine.

I ended up paying the developer a bit extra and he made me a .msi that I simply ran to install and register the .tlb file. It worked on all 3 computers just fine. The very interesting thing is, once ran, I was able to find the .tlb in the list of references under tools....in other words, I didn't have to go browse for it anymore.
Congratulations! Glad to hear you got it sorted out. Good luck with your project.
 

Users who are viewing this thread

Top Bottom