ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Deleting a read only file? (https://www.excelbanter.com/excel-programming/295191-deleting-read-only-file.html)

andycharger[_26_]

Deleting a read only file?
 
Is there a way, in macro, that I can delete a read only file or chang
it to writeable?

Reason I ask is that I have a file I want my users to access. However
My macro updates it overnight and I dont want them using a witeabl
version.

So What I have my macro do is:

Open a writeable local file, change it and save it to a networ
location. This would mean the file needs to be overwritten.

However, when it gets to the bit in the macro to overwrite the file
the macro fails with an error saying file cannot be overwritten.

I therefore need a way to either delete the read only file or make i
writeable.

I tried Kill filename and this did not work.

Any ideas

--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 08:02 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com