outputting to Excel, need to delete existing spreadsheet

P

PamsCF

I use macros and the OutputTo command to create spreadsheets and reports.
What is the command to have the macro erase/overwrite the existing file?
When I run it using the switchboard menu, it does not ask to replace the
existing file.
 
S

Steve Schapel

Pam,

You can use a VBA procedure instead of a macro, which provides the Kill
command to delete the existing file before running a DoCmd.OutputTo method.
 
Top