Hello,
I am trying to create a C# test dll to try out in an MS
Access mdb application. I open up a session of vs2003,
select C#/Class Library. Here is my code:
---------------------------------------------
using System;
public class firstDll
{
public static int myFirstDll()
{
int n = 5;
return n;
}
}
-----------------------------------------------
Before I build the dll I go to Project (called "testdll")
properties and select 'Register for Com Interop' = True.
Then I build the dll. Then I create a reference to the
testdll.tlb file in MS Access. But when I try to use the
dll it doesn't work. Here is how I invoke it in the
Access mdb
------------------------------------
Sub testOutDll()
Dim fd As testdll.firstDll
Set fd = New testdll.firstDll
Debug.Print fd.myFirstDll
End Sub
------------------------------------
I am able to see the intellisense dropdown for
Dim fd As testdll.firstDll
Set fd = New testdll.firstDll
But I don't get the intellisense dropdown for
fd.myFirstDll
The idea is that I would see "5" in the debug window. Can
anyone see what I am doing incorrectly here?
Thanks,
Ron