Save a Workbook as "Read Only"

  • Thread starter Budget Programmer
  • Start date
B

Budget Programmer

Hello,
I have a macro that creates and report in a workbook. Works fine. I place
it on the shared drive, no problem. However, once it's there (or As it's
being saved), I'd like to have the "windows" property of "Read Only"
selected. How would I go about that from Excel VBA?
Thanks for your help.
 
D

Dave Peterson

How about just using windows explorer to do it?

Open windows explorer
and with that file closed
rightclick on it, choose properties and on the general tab mark it readonly.

Another alternative is to:
file|SaveAs|General options (top left corner)
Give it a password to modify.

The users will be prompted each time it opens with that second suggestion.
 
B

Budget Programmer

Hi Dave,
I know how to do it manually. I'm looking for a way to do that from the
same VBA program that creates the spreadsheet. Is there some way to code
this?
Thanks again for your help.
 
D

Dave Peterson

Take a look at SetAttr in VBA's help.



Budget said:
Hi Dave,
I know how to do it manually. I'm looking for a way to do that from the
same VBA program that creates the spreadsheet. Is there some way to code
this?
Thanks again for your help.
 

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

Top