Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Restore Protect Sheet... menu command (MS Excel)

Status
Not open for further replies.

Mike555

Technical User
Joined
Feb 21, 2003
Messages
1,200
Location
US
In Excel, I used the following code to remove Protect Sheet... option from Tools | Protection menu.

Sub Delete_Item_on_Submenu()
Set x = CommandBars("Tools").Controls("Protection")
x.Controls("Protect Sheet...").Delete
End Sub

However, I can't get it back now. The code I used to attempt and get it back is:

Sub Restore_Item_on_Submenu()
Set x = CommandBars("Tools").Controls("Protection")
x.Controls.Add Type:=msoControlButton, ID:=30029, before:=1
End Sub

My reference code came from
Can anyone please tell me how to get this back???
Thanks.
Mike
 
If that's the only modification, reset the menu.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top