ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Excel to Access (https://www.excelbanter.com/excel-worksheet-functions/28804-excel-access.html)

Keith

Excel to Access
 

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



Duke Carey

Why wouldn't you just use ADO within VBA to run an insert query, inserting
from the Excel sheet into the Access database? That way you don't ever have
to 'open' Access.

I haven't done that via code in several years, and it'd take me a while to
go through archived files to find a sample. I'm sure some of the MVPs here
can jot off some samples lickety split, though.


"Keith" wrote:


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




Ron Coderre

See if this site helps you out:

http://www.exceltip.com/exceltips.ph...ategory&ID=213

--
Regards,
Ron


Ron de Bruin

See thread in Misc

--
Regards Ron de Bruin
http://www.rondebruin.nl



"Keith" wrote in message k...

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





All times are GMT +1. The time now is 08:49 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com