Avatar of Andy Brown
Andy Brown
Flag 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: http://www.geeksengine.com/article/create-dll.html

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.
.NET ProgrammingMicrosoft AccessVBA

Avatar of undefined
Last Comment
Andy Brown

8/22/2022 - Mon
John Tsioumpris

Are you sure you followed the example to the letter...it 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.
Shaun Vermaak

Did you use .NET 4?
ASKER CERTIFIED SOLUTION
ste5an

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Andy Brown

ASKER
Thank you, everyone, for coming back to me - I'll take a closer look.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
Andy Brown

ASKER
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.