ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Change file to read only (https://www.excelbanter.com/excel-programming/412156-change-file-read-only.html)

steven

Change file to read only
 
I have a macro that identifies who the user is when they enter the file. Is
there a way to change a file to Read Only in the Auto_Open macro.
The sequence of events is:
User Opens file / Auto_Open macro runs / code identifies who the user is /
depending on the user Change the file to Read Only.

Thank you for you help,

Steven

ward376

Change file to read only
 
ActiveWorkbook.ChangeFileAccess Mode:=xlReadOnly

Cliff Edwards

steven

Change file to read only
 
Thank you very much.

"ward376" wrote:

ActiveWorkbook.ChangeFileAccess Mode:=xlReadOnly

Cliff Edwards


ward376

Change file to read only
 
You're welcome.

Cliff Edwards



All times are GMT +1. The time now is 12:14 AM.

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