Save copy of file to open as read only

  • Thread starter Thread starter Ray Clark
  • Start date Start date
R

Ray Clark

I have written the code to save a file with a new name (copy file) but I need
to have this file opened as read-only so that no changes can be made to the
file and then saved.
ReadOnlyRecommended:=True gives the message that it is recommended that the
file be opened as read only but gives the option of being opened so changes
can be saved.
Is there a way of saving as read only and no option when opening of making
changes.

Any help on this would be appreciated.

Thanks
Ray
 
You could save the file and then mark it readonly either via windows explorer or
by using SetAttr in you code.

Excel will respect that setting and won't bother the user with a prompt.
 
Dave,

Great help, thank you.

Ray

Dave Peterson said:
You could save the file and then mark it readonly either via windows explorer or
by using SetAttr in you code.

Excel will respect that setting and won't bother the user with a prompt.
 
Back
Top