![]() |
In Excel 2003 is there a way to prevent "Save As" and "Print"?
|
In Excel 2003 is there a way to prevent "Save As" and "Print"?
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Cancel = True End Sub Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) If SaveAsUI Then Cancel = True End Sub Copy the above code into the Thisworkbook codemodule. Note that they will be defeated easily by any knowledgeable user.... HTH, Bernie MS Excel MVP "lucky2000" wrote in message ... |
In Excel 2003 is there a way to prevent "Save As" and "Print"?
Thank you for your response, one more question if I may persist.... can
'copy/paste' also be defeated in some easy fashion as 'save as' and 'print' were in your explanation? "Bernie Deitrick" wrote: Private Sub Workbook_BeforePrint(Cancel As Boolean) Cancel = True End Sub Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) If SaveAsUI Then Cancel = True End Sub Copy the above code into the Thisworkbook codemodule. Note that they will be defeated easily by any knowledgeable user.... HTH, Bernie MS Excel MVP "lucky2000" wrote in message ... |
In Excel 2003 is there a way to prevent "Save As" and "Print"?
Yes, sort of, kind of, not as reliably....
This should prevent copying a range and pasting it over itself: Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range) If Application.CutCopyMode < False Then With Application .EnableEvents = False .Undo .CutCopyMode = False .EnableEvents = True End With End If End Sub This will prevent copying one range and pasting over another range: Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range) If Application.CutCopyMode < False Then Application.CutCopyMode = False End Sub -- HTH, Bernie MS Excel MVP "lucky2000" wrote in message ... Thank you for your response, one more question if I may persist.... can 'copy/paste' also be defeated in some easy fashion as 'save as' and 'print' were in your explanation? "Bernie Deitrick" wrote: Private Sub Workbook_BeforePrint(Cancel As Boolean) Cancel = True End Sub Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) If SaveAsUI Then Cancel = True End Sub Copy the above code into the Thisworkbook codemodule. Note that they will be defeated easily by any knowledgeable user.... HTH, Bernie MS Excel MVP "lucky2000" wrote in message ... |
All times are GMT +1. The time now is 06:46 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com