![]() |
Save a Workbook as "Read Only"
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. -- Programmer on Budget |
Save a Workbook as "Read Only"
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. Budget Programmer wrote: 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. -- Programmer on Budget -- Dave Peterson |
Save a Workbook as "Read Only"
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. -- Programmer on Budget "Dave Peterson" wrote: 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. Budget Programmer wrote: 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. -- Programmer on Budget -- Dave Peterson |
Save a Workbook as "Read Only"
Take a look at SetAttr in VBA's help.
Budget Programmer wrote: 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. -- Programmer on Budget "Dave Peterson" wrote: 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. Budget Programmer wrote: 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. -- Programmer on Budget -- Dave Peterson -- Dave Peterson |
All times are GMT +1. The time now is 02:02 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com