Outputting Data to Excel

  • Thread starter Thread starter xpnovice
  • Start date Start date
X

xpnovice

Hi,

I have a Access XP db from which I output data directly to Excel using the
Output macro command. At the moment this creates a new Excel workbook from
which I extract the data via a link to another workbook containing the
formulae etc required to do the number crunching. This works fine but I
have to manually select the Yes to the "replace existing file" whenever I
run the macro. I have tried directing the output to a worksheet within and
existing workbook, but get an error message that the file cannot be found.

Question is, is the Output command purely able to create a new workbook, or
can I direct it to an existing worksheet?

Thanks in advance

JohnH
 
To do what you seek, you need to use the TransferSpreadsheet command. This
must be done in a macro or in VBA code.

If you specify an existing file as the "destination", this command inserts a
new worksheet into that file and puts your data on it.

This command also is better because it allows a greater amount of data to be
exported, and you can specify the "EXCEL version".

See more information in Help...post back if you need more info/help.
 
Thank you, I will try this soonest.

JohnH
Ken Snell said:
To do what you seek, you need to use the TransferSpreadsheet command. This
must be done in a macro or in VBA code.

If you specify an existing file as the "destination", this command inserts a
new worksheet into that file and puts your data on it.

This command also is better because it allows a greater amount of data to be
exported, and you can specify the "EXCEL version".

See more information in Help...post back if you need more info/help.
 
Back
Top