Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Code for Access file manipulation from Excel
Can someone please recommend tried and true bulletproof code that would
reside in an Excel file to manipulate an Access database file. I have not coded Access from Excel in a long time, so I'm especially interested in code you have used that you know from experience has done the job in these two scenarios: Scenario #1 Data in two Excel files needs to be combined and manipulated for pivot tables, reports, the usual programming stuff which is no problem. So far, that data has been getting into Excel manually, by first opening up an Access database, manually executing two queries (named MyQuery1 and MyQuery2), and downloading each Query's recordset into its own spreadsheet file. I need reliable code that will: From within Excel with a macro, open C:\My\File\Path\MyDatabase.mdb, execute MyQuery1 and MyQuery2, with each query creating its own Excel file, then close the MyDatabase.mdb file. I can deal programmatically with the 2 new Excel files from that point. Scenario #2 I have a table of records in my Excel file in Sheet1 (row 1 is header and the records start in row 2) that needs to be added to an existing table in an Access file named C:\MyFile\Path\OtherDatabase.mdb. So, from Excel, I need to open said Access file, add the Excel Sheet1 records to a table named MyTable, close said Access file, and then maybe go have a beer. Using Office 2003. Thanks !! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Manipulation of Data extract from Access Database | Excel Discussion (Misc queries) | |||
VBA code manipulation cells | Excel Programming | |||
VB Code or Excel macro to run Query/Import on Access file | Excel Programming | |||
Halting code for worksheet manipulation? | Excel Programming | |||
Disable Access to VBA Code in XLS File? | Excel Programming |