open access from excel ?

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

יריב החביב

Hello,

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

thank you
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top