Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Use Excel MS-Query from within Access (2010)

Status
Not open for further replies.

DevelopV

Technical User
Mar 16, 2012
113
ZA
I want to make use of Excel's MS-Query, but would like to automate it from an Access DAO module:

Data To Excel
1. Export a table into Excel using MS-Query
2. Declare the Excel cell where MS-Query will begin
3. Select a range of cells in Excel, merge them and insert text
4. Select a column and prevent changes to any cell's data
5. Hide a column
6. Save the Excel file

Data From Excel
1. Open the Excel file
2. Select 2 cells (not next to each other) and write the data to a table in Access

I need help with the Excel code

Many thanks
 
DevelopV,
What have you tried? Did you attempt to record a macro in Excel? You can usually take the Excel macro/vba and copy and paste it into an Access module and make a few updates in order to get it to run.

Duane
Hook'D on Access
MS Access MVP
 
... or you can create/select any data/recordset from/in Access and push it into Excel

Have fun.

---- Andy

A bus station is where a bus stops. A train station is where a train stops. On my desk, I have a work station.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top