View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Disable Save and Save As

Hi Rob

You can use this in the Thisworkbook module

Private Sub Workbook_BeforeClose(Cancel As Boolean)
ThisWorkbook.Saved = True
End Sub

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, _
Cancel As Boolean)
Cancel = True
End Sub

Remember that this will not work if the user disable macro's

And then use a save macro like this

Sub test()
Application.EnableEvents = False
ThisWorkbook.Save
Application.EnableEvents = True
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Rob" wrote in message ...
Excel 2000

How can I disable the save and Save As options both icons and menu?

When I make changes however to the file, I will want to save albeit happy to do so from the VBA menu.

Thanks, Rob