Correct way to kill

Experts,
The below code works. Now what I now need to do is delete the file after I have transferred the data to Access.
After I execute my DoCmd TransferSpreadsheet statement is this all I need to do to delete the file?

Kill fileName
=========================================
With Application.FileDialog(msoFileDialogOpen)
    .Title = "Select File"
    .Filters.Add "Excel Files", "*.xls"
    .InitialFileName = "D:\WilliamsSonoma\OB4"
    result = .Show
    fileName = Trim(.SelectedItems(1))
     
End With

   DoCmd.SetWarnings False
   DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "tblLaborMgmtDataImport", fileName, True, "Sheet1!A:G"
====================================================================
Frank FreeseAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Rey Obrero (Capricorn1)Commented:
you just need

Kill fileName    

filename is the complete path to your file
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
dqmqCommented:
Yes. Is it not working?
0
Shanmuga SundaramDirector of Software EngineeringCommented:
Kill "Filename with path" will work as capricorn1 suggests. Eg: Kill "C:\test.txt". if not you can also use filesystem object to delete a file.Hope this will help you if you want to delete using FSO.

http://www.rondebruin.nl/folder.htm
0
Frank FreeseAuthor Commented:
again, many thanks. just wanted to be right before being stupid.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.