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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top