Prevent re naming of a workbook

Paul999

New Member
Joined
Apr 5, 2006
Messages
30
Is it possible to prevent users re naming a work book when saving, I have a work book which many people update recently someone saved it with a slightly different file name there by creating two it was a nightmare to workout which was the most up-to-date.

Is there anyway to prevent this.

Thanks in advance
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Hi something like:
Code:
Private Sub Workbook_Open()
Application.CommandBars("File").FindControl(ID:=748).Enabled = False
Application.CommandBars("File").FindControl(ID:=3).Enabled = False
End Sub
this will remove the save as and save options from the 'file menu'

then put them back in a before close event and peform a save...?
Code:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.CommandBars("File").FindControl(ID:=748).Enabled = True
Application.CommandBars("File").FindControl(ID:=3).Enabled = True
ActiveWorkbook.Save
End Sub

Edit*

Heres a very good overview of the subject:

http://www.rondebruin.nl/menuid.htm

This also shows you how to disable CTRL + S you could add this to the open event and switch back on in the close event.
 
Upvote 0

Forum statistics

Threads
1,213,552
Messages
6,114,278
Members
448,559
Latest member
MrPJ_Harper

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top