[COLOR="Green"] 'late bound[/COLOR]
Dim obj As Object
Set obj = CreateObject("Access.Application")
[COLOR="Green"] 'early bound - requires a reference to Access[/COLOR]
Dim acc As new Access.Application
Make sure you run the Access.Application.Quit when you are done to ensure you don't leave multiple invisible instances running.
Oh, you mean a user defined function in an Access module. Yeah, that should work. Have you tried it?
The first Parameter is the name of the routine, and then if that routine takes parameters you can pass those in too...
dim returnvalue as variant
returnvalue = acc.Run("YourRoutineName", YourParam1, YourParam2)
...passes two parameters to a function called "YourRoutineName"