Export an Access Table to an Excel Spreadsheet

Category:
Database
Type:
Snippets
Difficulty:
Beginning
Author:
Brian matumbura

Version Compatibility: Visual Basic 6, Visual Basic 5

More information:
This subroutine saves an Access table to an Excel spreadsheet. See the comments for more detail.

You can use this code to export to different targets as well. For example, if you want to export to an Excel 5.0 Workbook, change 'Excel 8.0' to 'Excel 5.0' in the code. You can also export the table other spreadsheets such as Lotus 1-2-3.

Instructions: Copy the declarations and code below and paste directly into your VB project.

Declarations:

Code: