Hi people
Thanks in advance
From an Excel macro, I am trying to open an Access database and then run a module within the database.
I can get Access opened in a couple of ways, but can not open a specific file.
OR
The bits in red are the code I am unsure of.
Unfortunately, I don't know enough VBA for Access to turn it round and do it from Access.
I have no idea where to start in actually calling the macro in the database once the file is opened.
All help welcome and appreciated
Thanks
Rich
Thanks in advance
From an Excel macro, I am trying to open an Access database and then run a module within the database.
I can get Access opened in a couple of ways, but can not open a specific file.
Code:
Dim Retval
Dim fileval
Retval = Shell("C:\Program Files\Microsoft Office\Office\MSACCESS.EXE", vbMaximizedFocus)
[COLOR=red]fileval.getfile ("filepath\filename") [/color]
OR
Code:
Dim axsAPP As Object
Set axsAPP = CreateObject("Access.Application")
axsAPP.Visible = True
axsAPP.database.Open ("filepath\filename")
axsAPP.Quit
'Activate Access File
[COLOR=red]'Open db.Filename:="filepath\filename"[/color]
The bits in red are the code I am unsure of.
Unfortunately, I don't know enough VBA for Access to turn it round and do it from Access.
I have no idea where to start in actually calling the macro in the database once the file is opened.
All help welcome and appreciated
Thanks
Rich