![]() |
Allow users to edit cells but not save the info
Is it possible to allow users to edit cells and copy/paste/print but not save?
|
Allow users to edit cells but not save the info
On Fri, 10 Apr 2009 09:46:05 -0700, shelly
wrote: Is it possible to allow users to edit cells and copy/paste/print but not save? Yes. Instead of protecting the sheet, you make it a read only file. That way, they can not save changes back against the original filename. They would, however, be able to perform a save as, and then write back against the original name via a file manager. Maybe you can run a macro that inhibits saving. Ask in "m.p.excel.programming". |
Allow users to edit cells but not save the info
The most brutal, blunt code to inhibit saving would be to put this in the
workbook's ThisWorkbook code mudule: Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) Cancel = True End Sub That pretty much prevents saving it at all, with the original or any other name! Obviously this creates a bit of a maintenance problem - whenever you actually do any work with it that requires a save, the maintainer is going to have to go into the VB Editor to disable the disabler, so to speak. I personally think that your idea of saving it out as a read-only file is much better and if the OP is worried about someone using the file manager to save a copy over the original, then as with all good data center practices, there should be a copy that no one but the configuration manager can get to that is available to replace the one in use should it become corrupted for any reason. "UpGrade" wrote: On Fri, 10 Apr 2009 09:46:05 -0700, shelly wrote: Is it possible to allow users to edit cells and copy/paste/print but not save? Yes. Instead of protecting the sheet, you make it a read only file. That way, they can not save changes back against the original filename. They would, however, be able to perform a save as, and then write back against the original name via a file manager. Maybe you can run a macro that inhibits saving. Ask in "m.p.excel.programming". |
Allow users to edit cells but not save the info
Actually, your response has me thinking of a better solution. The admin makes the directory where the workbook is read only. That way, all users could only open the original read only file, even if a user does a local (his own machine) save as, because he cannot write to that directory. Hopefully, they do not pass around edited data files to each other, calling them the bona fide file. The original author of the file gets items placed into that directory, meant for read only access, via the Administrator. On Fri, 10 Apr 2009 12:31:01 -0700, JLatham wrote: The most brutal, blunt code to inhibit saving would be to put this in the workbook's ThisWorkbook code mudule: Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) Cancel = True End Sub That pretty much prevents saving it at all, with the original or any other name! Obviously this creates a bit of a maintenance problem - whenever you actually do any work with it that requires a save, the maintainer is going to have to go into the VB Editor to disable the disabler, so to speak. I personally think that your idea of saving it out as a read-only file is much better and if the OP is worried about someone using the file manager to save a copy over the original, then as with all good data center practices, there should be a copy that no one but the configuration manager can get to that is available to replace the one in use should it become corrupted for any reason. "UpGrade" wrote: On Fri, 10 Apr 2009 09:46:05 -0700, shelly wrote: Is it possible to allow users to edit cells and copy/paste/print but not save? Yes. Instead of protecting the sheet, you make it a read only file. That way, they can not save changes back against the original filename. They would, however, be able to perform a save as, and then write back against the original name via a file manager. Maybe you can run a macro that inhibits saving. Ask in "m.p.excel.programming". |
All times are GMT +1. The time now is 05:12 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com