Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old January 30th, 2004, 09:11 AM
Registered User
Join Date: Jan 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to zisko3
Default exporting a workbook from excel to access

hi all,

I have a workbook in excel that needs to be exported to access. In access I have a switchboard and a command button to export but it doesnt work. I created a macro and used transfer spreadsheet. Do I need some vb coding to make this work? I'm open to sugguestions.
thank you


Old February 3rd, 2004, 12:05 PM
Registered User
Join Date: Nov 2003
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts

What I think you want in the command button is to import, not export.

Using a macro with the TransferSpreadsheet action is the way to go.

Use these arguments for TransferSpreadsheet:

Transfer Type: Import
Spreadsheet Type: Choose whichever version of Excel that you are importing from.
Table Name: Input the name of a table that you want to import into (can be a new table or an existing table - name the table anything you want, if existing table it will append the data).
File Name: You put the exact path of where the file is located. For example \\myServer\C\myExcelSpreadsheet.xls.
Has Field Names: If the first row of your spreadsheet has columns name then you would answer YES.
Range: This is if you only want to include a range of cells. If you want the entire spreadsheet - leave blank, it will take the whole spreadsheet by default.

Hope this helps.

Similar Threads
Thread Thread Starter Forum Replies Last Post
Exporting From Access To Excel jimnich Access VBA 17 February 8th, 2008 07:23 AM
Exporting to Existing Excel Worksheet from Access kfs Access VBA 2 August 3rd, 2006 10:56 AM
Exporting to Excel from Access - field headings no chimp Access VBA 1 July 9th, 2004 11:54 AM
Excel Workbook created from Access VBA clueless_may Access VBA 0 June 8th, 2004 09:42 AM
Exporting access database to Excel .xls Squall Leonhart Classic ASP Databases 5 December 2nd, 2003 07:42 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.