ChangeFileAccess

J

Joo

I made a .xls file a readonly file by making it readonly from the properties.
However, when I send this through e-mail and the user detach it from the
e-mail, it becomes writable.
So I put a code in Thisworkbook.Open

ActiveWorkbook.ChangeFileAccess Mode:=xlReadOnly

If I do that, when I open up the file, it changes itself to readonly but it
will ask you if I want save changes before swithcing file status. I don't
want the user to see this pop up window. Is there anyway to by pass this or
even better way to make the file readonly when the user open it?

Thank you for your help in advance.
ps. I'm using Excel 2000
 
D

Doug

Hi

I haven't tried it but you could make it

Thisworkbook.Saved=True
ActiveWorkbook.ChangeFileAccess Mode:=xlReadOnly

That way it will appear to the macro that there are no changes to save so
you won't get asked (theorectically)

Doug
 

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