Hello, how do I set the read only attribute when opening a file? Please see the code below (does not currently work). Thank you.
Please Login or Register to view this content.
Hello, how do I set the read only attribute when opening a file? Please see the code below (does not currently work). Thank you.
Please Login or Register to view this content.
Last edited by Dora; 01-15-2009 at 09:43 PM.
You could save it password-protected in order to modify it.
File > Save As > Tools > General Options, then assign a password in the Password to Modify field.
HTH
Jason
Hello, this is Excel 2003. I want users to be able to modify the file, but to save it as a different name, that's what it needs to be read-only. I cannot set the read-only property as an attribute on the file level, but have to use a macro, because when I right-click/properties and select read-only, that read-only is not retained if I email the file to users. Once they get it in email and they save it in their location, it's not longer read-only. That's why it needs to be forced by a macro.
Wouldn't it be simpler to set the ReadOnly status manually? if you rly on code then it won't work unless the user enables macros.
In an case you cannot set the rad only property like that, you ned to use
Please Login or Register to view this content.
Last edited by royUK; 01-16-2009 at 02:56 AM.
Hope that helps.
RoyUK
--------
For Excel Tips & Solutions, free examples and tutorials why not check out my web site
Free DataBaseForm example
If you follow the steps I indicated above (it applies to Excel 2003), it will always open the file as read-only unless you enter the correct password. There is no need to use VBA to do this.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks