
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.