
Help:Using VB Funtions In Access With DLL's, EXE's
Quote:
>I have written a very simple function in both activex dll and exe format and
>referenced the dll/exe from the access database but still cannot use the
>function. Can anyone send me a vary brief description of how to do this
You need to define an object in your access code and then use "CreateObject" to
set it to your dll. After which you can access the Public Properties, Functions
and Subs in the class object:
Dim oVBObject As Object
Dim DummyVar as Variant
Set oVBObject = CreateObject("DLLName.ClassName")
oVBObject.Property = "Value" 'Setting a property of the class object
DummyVar = oVBObject.Function 'Using a function of the class object
ovbObject.SubRoutine 'Calling a Subroutine of the Class Object
'Also make sure you destroy the object when you are finished so that system
memory is released.
Set oVBObject = Nothing
Good Luck,
Chat
VB Developer for PC Scale
"Genius's and Fools, were all alike under God's eyes." - Unk