Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Force File Read-Only?
I am using Win2000 and Excel 2000. I put a workbook onto a company-wide
server, and I'm afraid users are going to screw it up so another user opens a file of garbage. The users are going to have to be able to filter and hide columns and rows. I can right-click on the file and set its property to Read-Only, so no changes get saved when the file closes. But I'm concerned that someone will simply turn it off. Is there any way to code a BeforeOpen action that will set this property to Read-Only, regardless of how it was checked/unchecked when the user opened it? Ed |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Force File Read-Only?
Sounds like you're better just blocking the Save event altogether.
Something like this added to the workbook code module will do the job. Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) Cancel = True End Sub This has the advantage that you can specifiy the criteria used to decide if a file can be saved. http://www.billlunney.com/Excel/FAQ/...ExcelFAQID=211 -- Regards, Bill Lunney www.billlunney.com "Ed" wrote in message ... I am using Win2000 and Excel 2000. I put a workbook onto a company-wide server, and I'm afraid users are going to screw it up so another user opens a file of garbage. The users are going to have to be able to filter and hide columns and rows. I can right-click on the file and set its property to Read-Only, so no changes get saved when the file closes. But I'm concerned that someone will simply turn it off. Is there any way to code a BeforeOpen action that will set this property to Read-Only, regardless of how it was checked/unchecked when the user opened it? Ed |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Force excel to read dates as D/M/YYYY | Excel Worksheet Functions | |||
Force read-only in auto_open macro | Excel Discussion (Misc queries) | |||
I have a read only xl file, I need it to be read and write | Excel Discussion (Misc queries) | |||
How can a file be converted from Read-Only to Read/Write | Excel Discussion (Misc queries) | |||
How do I force an Excel macro to ask me which file and directory? | Excel Discussion (Misc queries) |