Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Manipulation of Data extract from Access Database Chase Excel Discussion (Misc queries) 2 July 19th 07 07:42 AM
VBA code manipulation cells Craig[_21_] Excel Programming 2 April 10th 05 10:06 AM
VB Code or Excel macro to run Query/Import on Access file Harry[_8_] Excel Programming 13 February 22nd 05 07:27 PM
Halting code for worksheet manipulation? What-a-Tool[_2_] Excel Programming 2 November 5th 04 12:09 AM
Disable Access to VBA Code in XLS File? Richard Fry Excel Programming 1 May 6th 04 02:24 PM


All times are GMT +1. The time now is 07:04 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"