Link to home
Create AccountLog in
Avatar of Andy Brown
Andy BrownFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Creating a .NET based DLL for VBA

As an experiment, I want to create a c#/.Net DLL that I can reference from MS Access VBA.  So far, I have used two examples - but each one gives me the following error when I try to add it as a refernce:

"Can't add a reference to the specified file".

Here is one of the examples that I used:

Adding the reference would be ideal, but I could also use late binding.  However, I just need to find a starting point and figure out what I'm doing wrong.

Any help would be greatly appreciated.
Avatar of John Tsioumpris
John Tsioumpris
Flag of Greece image

Are you sure you followed the example to the has being quite some years since a tested this and it worked just fine...i have made the .dll and used it just fine on my Access application.
Did you use .NET 4?
Avatar of ste5an
Flag of Germany image

Link to home
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of Andy Brown


Thank you, everyone, for coming back to me - I'll take a closer look.
Thank you guys (esp Ste5an).  As soon as I added:

  /codebase /tlb.

To the end - it all worked.

Thank you again everyone - that's been a big help.