Kill Statement

Hi All,i am using kill statement it’s not working fine. when i am debbugging the code i am getting error from kill statement line.

vtFileName=vtFileName + "" + Format$(Now ,“YYYY-MM-DD”) + “_” +“CalstrsRE_Extracts.xls”

Set excelNewWkbk = excelWkbks.Add

Kill (vtFileName)

Call excelNewWkbk.SaveAs(vtFileName)

i am trying to kill excel file already saved in h: drive. i am saving file using configuration field vtFileName.

the excel file is saving using date format. how to delete excel file using kill statement.

thanks,

prasad

Subject: Kill Statement

I had a similar problem with trying to Kill a Word docTo solve it I had to add a Sleep 5 statement before the Kill

to allow the file to be closed properly - See if this works for you