open access from excel ?

  • Thread starter יריב החביב
  • Start date
×

יריב החביב

Hello,

What is the code (if possible) to open access application from excel ?

thank you
 
R

Ron de Bruin

Hi ?

Try this to open C:\OrderDatabase.mdb

Sub test()
Dim ac As Object
On Error Resume Next
Set ac = GetObject(, "Access.Application")
If ac Is Nothing Then
Set ac = GetObject("", "Access.Application")
ac.OpenCurrentDatabase "C:\OrderDatabase.mdb"
ac.UserControl = True
End If
AppActivate "Microsoft Access"
End Sub
 
×

יריב החביב

Thank YOU
--
תודה רבה


Ron de Bruin said:
Hi ?

Try this to open C:\OrderDatabase.mdb

Sub test()
Dim ac As Object
On Error Resume Next
Set ac = GetObject(, "Access.Application")
If ac Is Nothing Then
Set ac = GetObject("", "Access.Application")
ac.OpenCurrentDatabase "C:\OrderDatabase.mdb"
ac.UserControl = True
End If
AppActivate "Microsoft Access"
End Sub
 
Top