Save copy of file to open as read only

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
 
D

Dave Peterson

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.
 
R

Ray Clark

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top