If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
From another mdb run VBA code
I have a function updateTables() in a a different db.
How do I run this remotely. In addition is it possible to pass parmeters Regards -- Trev B |
#2
|
|||
|
|||
From another mdb run VBA code
On Sat, 2 Jan 2010 08:31:01 -0800, Trev B
wrote: Yes you can. Here is an example: In database 1: Sub test() Dim objAccess As New Access.Application objAccess.OpenCurrentDatabase "c:\test\database2.accdb" objAccess.Eval "Hello('aaa')" End Sub In database 2 in a standard module: Public Function Hello(ByVal s As String) MsgBox "Hello " & s End Function -Tom. Microsoft Access MVP I have a function updateTables() in a a different db. How do I run this remotely. In addition is it possible to pass parmeters Regards |
#3
|
|||
|
|||
From another mdb run VBA code
Tom van Stiphout wrote in
: Yes you can. Here is an example: In database 1: Sub test() Dim objAccess As New Access.Application objAccess.OpenCurrentDatabase "c:\test\database2.accdb" objAccess.Eval "Hello('aaa')" End Sub In database 2 in a standard module: Public Function Hello(ByVal s As String) MsgBox "Hello " & s End Function Another option would be to use Application.Run: Application.Run("c:\test\database2.Hello", "aaa") -- David W. Fenton http://www.dfenton.com/ usenet at dfenton dot com http://www.dfenton.com/DFA/ |
Thread Tools | |
Display Modes | |
|
|