If you have vs2003 or vs2005 you can create your class library project
as "testdll"
using System;
public class firstDll
{
public int n = 5;
public int myFirstDll()
{
return 6;
}
}
Before building the dll, make sure you selecc
Register for Com Interop True
in the Project properties window. Then in Access you make a reference
to the testdll.tlb object library you just created. To invoke the dll
do this in Access:
Sub testOutDll()
Dim f As testdll.firstDll
Set f = New testdll.firstDll
Debug.Print f.n
Debug.Print f.myFirstDll
End Sub
This will print 5 and 6 respectively in the debug window in Access.
Rich
*** Sent via Developersdex
http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!