c# - Using a .Net DLL in Microsoft Access VBA -



c# - Using a .Net DLL in Microsoft Access VBA -

ok have assembly, written in c#, using visual studio 2010.

this assembly contains 1 class, contains 1 method returns word result, code below:

using system.runtime.interopservices; namespace testdll { public class class1 { [comvisible(true)] public string testmethod() { homecoming "result"; } } }

the output section in build tab on properties window looks so:

when click on build, dll file , tlb file. can add together tlb file microsoft access browsing it.

now, in access have button , label. want create caption property of label equal result of testmethod. i'm thinking need similar below i'm not sure, help much appreciated:

private sub btnmain_click() dim tm testdll dim foo string foo = tm.testmethod lblbarr.caption = foo end sub

thankyou

maybe next work:

private sub btnmain_click() dim tm testdll.class1 dim foo string set tm = new testdll.class1 foo = tm.testmethod lblbarr.caption = foo end sub

c# vba dll vb6 type-library

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -