View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default How to block file Save (^S)?

You might use the beforesave event:

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
If Not SaveAsUI Then
Cancel = True
End If
End Sub

If macros are disable, this of course will not work.

If you not familiar with events see Chip Pearson's page
http://www.cpearson.com/excel/events.htm

--
Regards,
Tom Ogilvy

"G Lykos" wrote in message
...
What can be done in VBA such that <CTRL<S will be blocked from saving a
spreadsheet file?

Situation is that a macro has manipulated the spreadsheet for the purposes
of analysis, and I would like to then block the user from inadvertently
Save-ing this version of the file - but perhaps allow Save As.

Thanks,
George