![]() |
Delete File in a folder
Hi all, i save a file to a folder using a certain name and after i have
finished with it and closed it i need to delete it. I have played with some code but just cannot get it to work. Could somebody help me out of my misary please !! Les Stout *** Sent via Developersdex http://www.developersdex.com *** |
Delete File in a folder
Set fs = CreateObject("Scripting.FileSystemObject")
Set obj = fs.GetFile("your-file-name") obj.Delete "Les Stout" wrote in message ... Hi all, i save a file to a folder using a certain name and after i have finished with it and closed it i need to delete it. I have played with some code but just cannot get it to work. Could somebody help me out of my misary please !! Les Stout *** Sent via Developersdex http://www.developersdex.com *** |
Delete File in a folder
If you want to use the built in VBA capabilities:
Kill "C:\MyFolder\MyFile.xls" -- Regards, Tom Ogilvy "Les Stout" wrote in message ... Hi all, i save a file to a folder using a certain name and after i have finished with it and closed it i need to delete it. I have played with some code but just cannot get it to work. Could somebody help me out of my misary please !! Les Stout *** Sent via Developersdex http://www.developersdex.com *** |
Delete File in a folder
Kill full_filename_including_path -- HTH Bob Phillips (remove nothere from email address if mailing direct) "Les Stout" wrote in message ... Hi all, i save a file to a folder using a certain name and after i have finished with it and closed it i need to delete it. I have played with some code but just cannot get it to work. Could somebody help me out of my misary please !! Les Stout *** Sent via Developersdex http://www.developersdex.com *** |
Delete File in a folder
Thanks Bob and Tom, have a great weekend.
best regards, Les Stout *** Sent via Developersdex http://www.developersdex.com *** |
All times are GMT +1. The time now is 05:38 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com