Hi Marcelo
To stop a "Save As" from within the *Workbook only*, use the code below.
Right click on the Excl icon, top left next to "File" and select "View
Code" in here paste
Private Sub Workbook_BeforeSave _
(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Cancel = SaveAsUI
End Sub
Or, if you want to show the user a message, use this code.
Private Sub Workbook_BeforeSave _
(ByVal SaveAsUI As Boolean, Cancel As Boolean)
If SaveAsUI = True Then
Cancel = True
MsgBox "Sorry, you cannot Save As", vbOKOnly
End If
End Sub
To get back to Excel, simply click the top right X.
** Posted via:
http://www.ozgrid.com
Excel Templates, Training, Add-ins & Business Software Galore!
Free Excel Forum
http://www.ozgrid.com/forum ***