Export table

  • Thread starter Thread starter Luis
  • Start date Start date
L

Luis

Hello.
I have a db that i want to automate. One of the processes
is to export a table to a certain location as an .xls
file. This file may exists or not, but if exists i want to
replace it with a new file using the same name. I have
tryied with the OutputTo function but, if the file exists,
before exporting the table appears a dialog box to confirm
if i want to replace the file or not, alltough i have
SetWarnings = False.
How can i solve this?

Thanks
Luis
 
Luis,
Try this approach.

On error resume next
Kill("YourFileName")

The error statement is in there in case the file is not
there then an error will be thrown. The
YourFileName is the path for your previous export file.

--Craig
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top