ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Read only (https://www.excelbanter.com/excel-programming/374162-read-only.html)

Brian

Read only
 
Hi

How do you set the file as read only.

Br.

Ron de Bruin

Read only
 
Hi Brian

With code look for ChangeFileAccess in the VBA help

ActiveWorkbook.ChangeFileAccess xlReadOnly


--
Regards Ron de Bruin
http://www.rondebruin.nl



"Brian" wrote in message ...
Hi

How do you set the file as read only.

Br.
Brian




Peter T

Read only
 
If you mean permanently change the file's read-only attribute (file must be
closed)

SetAttr "C:\MyFile.xls", vbReadOnly

Regards,
Peter T

"Brian" wrote in message
...
Hi

How do you set the file as read only.

Br.
Brian






All times are GMT +1. The time now is 12:07 PM.

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