Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Open Access Database with VBA
I have created a macro in an Excel workbook to do various things with a web query, then export one sheet of the workbook as a txt file. I then get the macro to open Access. What I am wanting to do is:- I want my macro to, not only open Access, but to open a specific Access Database and if possible, run a macro within that database to import the data that I have exported from Excel. Any ideas? Thanks |
#2
|
|||
|
|||
Try this Keith
Sub test() On Error Resume Next Set ac = GetObject(, "Access.Application") If ac Is Nothing Then Set ac = GetObject("", "Access.Application") ac.OpenCurrentDatabase "C:\testing.mdb" ac.UserControl = True End If AppActivate "Microsoft Access" End Sub I never try to open a macro in Access ? -- Regards Ron de Bruin http://www.rondebruin.nl "Keith" wrote in message ... I have created a macro in an Excel workbook to do various things with a web query, then export one sheet of the workbook as a txt file. I then get the macro to open Access. What I am wanting to do is:- I want my macro to, not only open Access, but to open a specific Access Database and if possible, run a macro within that database to import the data that I have exported from Excel. Any ideas? Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Importing Data from an Access Database Including a Hyperlink Colum | Excel Discussion (Misc queries) | |||
Excel cannot open Access MDB | Excel Discussion (Misc queries) | |||
Open Access Database under and Excel window using a Macro | Excel Worksheet Functions | |||
How to use a Access Query that as a parameter into Excel database query | Excel Discussion (Misc queries) | |||
i want to open database exclusively | Excel Discussion (Misc queries) |