Attn: Ken Snell - Delete Excel Spreadsheet

  • Thread starter Thread starter Ang
  • Start date Start date
A

Ang

Thanks a million,

Is a way to delete "Old" C:\Temp\Test.xls first before making new Test.xls.
I am having a problem with the Excel spreadsheet and notice that it kept
adding "tabs". I just want only one tab.

Your help would be appreciated.

Ang

**************************************************

Don't open the query. Instead, use its name as the "table name" argument in
the TransferSpreadsheet command:

DoCmd.TransferSpreadsheet acExport, 8, Me!lstQuery, "C:\Temp\test",
True, ""
 
Yes, insert the following step just before the TransferSpreadsheet step:

If Dir("C:\Temp\Test.xls") <> "" Then Kill "C:\Temp\Test.xls"
 
Back
Top