ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Disable menu items with VBA (https://www.excelbanter.com/excel-programming/304767-disable-menu-items-vba.html)

jst_se

Disable menu items with VBA
 
Under File menu, I want to disable "Save" and "Save as". Is it possible
to do with maybe a Workbook_Open()-function or something like that?

--
Reclaim Your Inbox!
http://www.mozilla.org/products/thunderbird/

Ron de Bruin

Disable menu items with VBA
 
Hi

You can use this in the Thisworkbook module

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

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


"jst_se" wrote in message ...
Under File menu, I want to disable "Save" and "Save as". Is it possible
to do with maybe a Workbook_Open()-function or something like that?

--
Reclaim Your Inbox!
http://www.mozilla.org/products/thunderbird/





All times are GMT +1. The time now is 01:32 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com