Writing table data to an existing spreadsheet 
Author Message
 Writing table data to an existing spreadsheet

Hi,
That technique is know as automation and you need to set a
reference to the Excel type library.
With any code module open, go to Tools->References
and select Microsoft Excel <your version> Library

HTH
Dan Artuso, MVP


Quote:
> Being fairly new to VBA, I have copied a chunk of code
> from another database to create an Excel GL Journal sheet,
> i.e. a number of header-type rows followed by multi rows
> of data, from an Access table.

> The original code runs fine in its own database but I
> get "User-defined type not defined" for the line

> Dim xlapp as New Excel.Application    'Starts up hidden
> excel application ERROR if excel already running

> Is it because there needs to be this "hidden application" -
>  if so, how do I create it - if not, what is it I'm
> missing ?

> Any assistance would be much appreciated.



Fri, 13 May 2005 09:36:32 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Importing spreadsheets into existing tables in Access

2. performance of writing data writing into database tables

3. Write image data as binary to append existing file

4. File I/O - writing/inserting data to existing file

5. Generating a Table from existing data

6. Looking for existing Data in a Table

7. add a column to an existing data table

8. add column to an existing data table

9. How to modified existing field and add new field in existing table for Access database

10. reverse engineer an existing excel spreadsheet using WSH

11. Using an Existing Spreadsheet in VB

12. Populating fields from an existing Excel spreadsheet

 

 
Powered by phpBB® Forum Software