Make a file read only

  • Thread starter Thread starter Michael Singmin
  • Start date Start date
M

Michael Singmin

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
 
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 (e-mail address removed)
 
Back
Top