Disabling 'File/Save' Menu Item
"Paige" wrote in message
...
I would like to disable the File/Save menu item once a workbook is opened,
forcing a person to save the file under another name. I have code (see
below) to disable the File/Save As menu item, but cannot make one work for
disabling just File/Save. Can anyone assist with this?
Sub DisableSaveAsMenuItem()
With CommandBars("Worksheet Menu Bar")
With .Controls("File")
.Controls("Save As....").Enabled = False
End With
End With
End Sub
Try this:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
If Not SaveAsUI Then
Cancel = True
End If
End Sub
It will prevent File|Save but not File|Save As. Is this hwat you want? You
say that you want to force tthe user to save under a different name. I don't
understand why your code tries to disable Save As.
/Fredrik
|