ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   ChangeFileAccess (https://www.excelbanter.com/excel-programming/330223-re-changefileaccess.html)

Tom Ogilvy

ChangeFileAccess
 
Before you resort to code, make a copy of the workbook and change its read
only attribute to true by right clicking it in explorer and selecting
properties.

--
Regards,
Tom Ogilvy


"Joo" wrote in message
...
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




joo

ChangeFileAccess
 
Tom,

Thank you so much for helping me.
Your code worked perfect.. exactly the way I wanted.
Thanks so much again.




All times are GMT +1. The time now is 09:06 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com