Export MS Access query to MS Excel

Agarfey

New Member
Joined
Aug 19, 2002
Messages
3
Hi People,

I currently use the following code to export a MS Access query into MS Word. I would like to know how to achieve the same result. ie Export to Excel in place of Word. Can anyone help.

Private Sub cmdExportWord_Click()
Dim strQueryName As String
strQueryName = "qdf_Export_DA_Objectives"
Call qw_wExportRTF(strQueryName)
End Sub

Thanks
Abe
This message was edited by Agarfey on 2002-09-09 15:25
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.

Juan Pablo González

MrExcel MVP
Joined
Feb 8, 2002
Messages
11,959
This Sub is what handles the exporting, not the one you posted.

qw_wExportRTF

so, without looking at it, it's very difficult.
 

DonkeyOte

MrExcel MVP
Joined
Sep 6, 2002
Messages
9,123
It seems a lot of people encounter problems importing/exporting to Access through VB!

Are you wanting to run the procedure from within Access or Excel?

My recommendation would be to set up the macro in Access if you're more comfortable in Access than Excel(DoCmd etc...) and then write a simple Macro in Excel that calls the Access procedure.
 

gareth

Board Regular
Joined
Apr 15, 2002
Messages
234
Why use VBA when you can simply save it as an .xls file in Excel from Access ???
 

Forum statistics

Threads
1,144,438
Messages
5,724,361
Members
422,546
Latest member
KevinOnTheDaily

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top