Insert Command accidentally deleted from Cell Menu

P

Pflugs

I accidentally deleted the Insert command from my cell menu, and I can't seem
to get it back. Here's my code:

Sub getInsertBack()
Dim myBar As CommandBar
Dim myButton As CommandBarButton
Set myBar = Application.CommandBars("cell")
Set myButton = myBar.Controls.add(msoControlButton, 3181, , 6)
End Sub

I keep getting a run-time error saying the add method has failed. The code
looks correct. Can someone help?

Thanks,
Pflugs
 
C

Chip Pearson

You can just reset the command to factory defaults:
Type:
Application.CommandBars("Cell").Reset
in the Immediate window.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting
www.cpearson.com
(email on the web site)
 
B

Bill Renaud

Bring up the Customize dialog box, select the Commands tab, select the
appropriate "Categories" in the left list box, then drag the appropriate
command from the "Commands" list box back onto the menu. These
instructions are for Excel 2000, and may be slightly different in your
version.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top