Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
If SaveAsUI Then MsgBox "You are not allowed to use SaveAs, only the Save Command."
Cancel = SaveAsUI
End Sub
No. And from what I read breaking Excel "locks" isn't hard for the resourceful-determined.
Sounds more like you want a PDF, XPS or HTML copy of the worksheet.
The last part of your request....
Place the below code into the "ThisWorkbook" module of your workbook.
Code:Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) If SaveAsUI Then MsgBox "You are not allowed to use SaveAs, only the Save Command." Cancel = SaveAsUI End Sub
As regards the first part of your request...
You could Protect the Sheet..
Replace with:
Code:Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) If Not SaveAsUI Then MsgBox "You are not allowed to use Save, only the SaveAs Command." Cancel = Not SaveAsUI End Sub