View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default 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