I have a page where user can download an Excel spreadsheet. What the asp code does is to read data from an Access database and create an Excel file which is saved in a tmp folder in the server. I want to delete this file after user leaves the page because for some reason I have to grant everyone full access to the tmp folder and the data in the spreadsheet is sensitive.<BR><BR>I used <BODY OnUnload="DeleteFile(filename)"> to call a function DeleteFile(file). Part of the code is <BR>...<BR><BODY BACKGROUND="/images/background.jpg" TEXT="#000080" LINK="#000080" VLINK="#000080" ALINK="#000080 OnUnload="DeleteFile(filename)"><BR><scr ipt language = "VBScript"><BR>Sub DeleteFile(file)<BR> Dim fso<BR> set fso = CreateObject("Scripting.FileSystemObject")<BR> fso.DeleteFile file<BR>End Sub<BR></script><BR>...<BR><BR>The problem is even if I close the browser after load this page, the tmp file is still not deleted from the server. There is no error massage.<BR>Please help me to find what's wrong with the code, or you have better idea. Thanks a lot!