Opening Access From Excel

K

Kieron White

I have an excel spreadsheet and I would like to know whether or not it is
possible to open an Access database from excel using VBA?

Any help would be appreciated.

Many thanks,

Kieron White
 
R

Ron de Bruin

Here do you have a few tips

To open a file

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


To get info form the file see
http://www.rondebruin.nl/accessexcel.htm
 
Top