I have a Excel template with code (.xltm) which when used creates an .xlsm Excel. In that one, I'd like to block the user from using the Save and Save As menu points of the File "menu", because I have my own routine to save with a given name in a give directory when the user closes the Excel.
I have been fighting without results with what I found so far here and in the internet in terms of VBA code. It all seems to apply to older versions of Excel, and the only things that did not generate an outright runtime error are not working either. They are:
1) Application.CommandBars("Worksheet Menu Bar").Controls("File").Controls("Save").Visible = False
2) Private Sub Hide_menu_options()
Dim CmdBar As CommandBar
Dim Cmb As CommandBarControl
Set CmdBar = Application.CommandBars("Worksheet Menu Bar")
For Each Cmb In CmdBar.Controls
Select Case Cmb.Caption
Cmb.Visible = False
Can anyone give me something that works or tell me what's wrong with the above in Excel 2013 ?
Thanks for help