Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Rob Rob is offline
external usenet poster
 
Posts: 234
Default Disable Save and Save As

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default Disable Save and Save As

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)

Cancel = True

End Sub
  #4   Report Post  
Posted to microsoft.public.excel.programming
Rob Rob is offline
external usenet poster
 
Posts: 234
Default Disable Save and Save As

Thanks very much, works a treat. Rob
"PosseJohn" wrote in message
...
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)

Cancel = True

End Sub



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how can i disable save i need save as only David128 New Users to Excel 3 November 9th 09 11:46 AM
Disable Save/Save As - not working? Silena K-K Excel Discussion (Misc queries) 3 December 11th 07 03:09 PM
Disable Quick Save & Save As L Weber Excel Discussion (Misc queries) 6 October 18th 07 08:57 PM
Disable save nobbyknownowt Setting up and Configuration of Excel 1 February 14th 07 08:18 PM
Disable save, but not save as Wstohler Excel Programming 1 December 22nd 03 11:46 PM


All times are GMT +1. The time now is 08:50 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"