![]() |
Saving over a read only file
i have a program that saves the open spread sheet over the previous revision
in 4 different locations on the server. the problem is that one of the locations has the the current file in a read only format, and an error pops up that it cant save over it. is there a way around this? its the 'Server-1\Released' folder that has the files in read only format. Application.DisplayAlerts = False ActiveWorkbook.SaveAs Filename:="\\Server-1\Estimator\" &ActiveWorkbook.Name ActiveWorkbook.SaveAs Filename:="\\Server-1\Released\" &ActiveWorkbook.Name ActiveWorkbook.SaveAs Filename:="C:\Documents\" & ActiveWorkbook.Name ActiveWorkbook.SaveAs Filename:="C:\Backup\" &ActiveWorkbook.Name Application.DisplayAlerts = True |
Saving over a read only file
Use the setattr command to change it to not read only. then overwrite it.
-- Regards, Tom Ogilvy "lawson" wrote in message ... i have a program that saves the open spread sheet over the previous revision in 4 different locations on the server. the problem is that one of the locations has the the current file in a read only format, and an error pops up that it cant save over it. is there a way around this? its the 'Server-1\Released' folder that has the files in read only format. Application.DisplayAlerts = False ActiveWorkbook.SaveAs Filename:="\\Server-1\Estimator\" &ActiveWorkbook.Name ActiveWorkbook.SaveAs Filename:="\\Server-1\Released\" &ActiveWorkbook.Name ActiveWorkbook.SaveAs Filename:="C:\Documents\" & ActiveWorkbook.Name ActiveWorkbook.SaveAs Filename:="C:\Backup\" &ActiveWorkbook.Name Application.DisplayAlerts = True |
All times are GMT +1. The time now is 04:34 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com