ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Make a file read only (https://www.excelbanter.com/excel-programming/281365-make-file-read-only.html)

Michael Singmin

Make a file read only
 
Hello Group,

I am using Excel 2000.
Can one change the properties of a file (eg. make it read only) via
VBA or by calling some API function ?

Thanks,

Michael Singmin


Chip Pearson

Make a file read only
 
Michael,

You can set the Read-Only attribute with code like the following:

SetAttr "C:\book1.xls", vbReadOnly



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Michael Singmin" wrote in message
...
Hello Group,

I am using Excel 2000.
Can one change the properties of a file (eg. make it read only) via
VBA or by calling some API function ?

Thanks,

Michael Singmin





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

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