By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,715 Members | 1,815 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,715 IT Pros & Developers. It's quick & easy.

Exporting Access -> Excel

P: n/a
I am quite new to VBA and Access, but I am trying to figure out how to
export specific values from a table in Access, so I can save it in a
given cell in Excel. I have been able to figure out how to open and
modify cells in my spreadsheet, but I don't understand how to select
elements of the Access table to export it to Excel. Here is what I
have so far:

Dim xlApp As Object
Dim wkbk As Object
Dim Sheet As Object, Cell As Object
Dim Q2CNumber As Object

Set xlApp = CreateObject("Excel.Application")
Set wkbk = xlApp.Workbooks.Open("C:\Spreadsheet.xls")
Set Sheet = wkbk.Worksheets("Sheet1")
Set Cell = Sheet.Range("B3")

' Saving Spreadsheet and quiting Excel
wkbk.SaveAs "C:\Spreadsheet-New.xls"
xlApp.Quit

Thank you for the help,
Sean

Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
why would you ever want to use excel for anythign?

excel is a disease. learn Access, then VB then SQL Server.

Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.