Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,441
Default 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
...






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
"Save" and "Save As" options greyed out - "Save as Webpage" option Bill Excel Discussion (Misc queries) 0 January 16th 07 04:47 PM
HELP on "left","right","find","len","substitute" functions serene83 Excel Discussion (Misc queries) 5 June 27th 06 02:23 AM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM
Complex if test program possible? If "value" "value", paste "value" in another cell? jseabold Excel Discussion (Misc queries) 1 January 30th 06 10:01 PM
Insert "-" in text "1234567890" to have a output like this"123-456-7890" Alwyn Excel Discussion (Misc queries) 3 October 25th 05 11:36 PM


All times are GMT +1. The time now is 09:36 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"