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

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
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,214,651
Messages
6,120,744
Members
448,989
Latest member
mariah3

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