JB
A useful bit of code that I use myself on several workbooks - the code must be placed in the ThisWorkbook object.
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
If SaveAsUI Then
MsgBox "The 'Save As' function has been disabled." & Chr(10) & "Only 'Save' will work.", vbInformation, "Save As Disabled"
Cancel = True
End If
End Sub
Hope this helps.
JAF.
Its not working JAF.could you fixed the code
ps: I'm using Excel97
Thanks
I've checked the code and it works fine on Excel 2000 (unable to check on Excel 97).
Have you put the code in the ThisWorkbook object or just pasted it into a normal module? The code MUST bein the ThisWorkbook object (in the Visual Basic Explorer, select View-Project Eplorer, then expand Microsoft Excel Objects, double click ThisWorkbook and paste the code into the window that opens.
JAF
Its not working JAF.could you fixed the code ps: I'm using Excel97 Thanks
: JB : A useful bit of code that I use myself on several workbooks - the code must be placed in the ThisWorkbook object. : Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) : If SaveAsUI Then : MsgBox "The 'Save As' function has been disabled." & Chr(10) & "Only 'Save' will work.", vbInformation, "Save As Disabled" : Cancel = True : End If : End Sub : Hope this helps. : JAF.