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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy field from Access to Excel

Status
Not open for further replies.

Sadukar

Technical User
Feb 19, 2003
159
IE
Hi All

I have an Access db.

I want to export data from a particular field in a table to excel. For example:
I want to place field 4, from record 10, into Cell A1.
What code do I need for this?

I was thinking something along the lines of:
Dim oApp As Object
Set oApp = CreateObject("Excel.Application")
oApp.Documents.Open (D:\MySpreedsheet)
App.Visible = True
DoCmd.GoToRecord acDataTable, "MyTable", acGoTo, 10
Copy Field 10 and Paste to Excel "A1" ???????????????

Any suggestions?
S.
 
Do you want to send it to an open excel document or to a file that you can open in excel. I can't help you with the former but the latter I have just had to work with a DB that does this.

Booiinnggg ... Zebbeddee ... Booiinnggg
 
Thanks for the reply Z

I have now decided to output to a file using "output to Action" Macro.

Do you know if it is possible to output to a particular sheet in a particular .xls file, without copying over the .xls file?

S.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top