I have add a reference of access library into vb project and I could use of access function like
a=nz(3,0)
How could we do it in our own dll with out interface
Printable View
I have add a reference of access library into vb project and I could use of access function like
a=nz(3,0)
How could we do it in our own dll with out interface
Pardon? What do you mean without an interface?
The dll's interface is it's properties and that is how you use it.
Are you referring to late binding?
Code:Dim objExcel As Object
Set objExcel = CreateObject("Excel.Application")
using access library we don't have to user interface and no need to create object simply we can use
n=nvl(a,0)
how can we do that when we make our own dll
I think what we are saying is to try and explain better. You just posted almost word for word what you did last time, but what does it mean? I realize there could be a language barrier here but anything you can do to explain would be great.
Actually I want to put all function into dll that I made in module
so that other user could use it but couldn't see the codes.
Suppose I have made a function in the module
public function nvl(a,b as variant) as variant
if isnull(a) then
nvl=b
else
nvl=a
end if
end function
Now I can use it my form
private sub form1_click()
dim a as variant
a=null
msgbox nvl(a,10)
end sub
similarly I want to write function in dll so that I could use it just like above event
note
(While including access lib I can user the function written in access )
On the class module with all your functions in it change the instancing to Global MultiUse.
Thanks very much for your answer.But it will be very greatful if you show me an example how to do it.
Thanks
Here you go although all I did was cut and paste the code you posted:
You'll either have to open both projects together (the grpDLL file) or you'll have to compile the dll and reassign the reference in the app project.Quote:
public function nvl(a,b as variant) as variant
if isnull(a) then
nvl=b
else
nvl=a
end if
end function
Now I can use it my form
private sub form1_click()
dim a as variant
a=null
msgbox nvl(a,10)
end sub