Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 167
Default Insert Command accidentally deleted from Cell Menu

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Insert Command accidentally deleted from Cell Menu

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)


"Pflugs" wrote in message
...
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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 417
Default Insert Command accidentally deleted from Cell Menu

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.
--
Regards,
Bill Renaud


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do i find an accidentally deleted file? mark1940 Excel Discussion (Misc queries) 3 October 16th 07 05:01 PM
accidentally deleted two columns, can I recover them Technophobe Excel Discussion (Misc queries) 6 January 18th 07 08:52 PM
How do I retrieve a accidentally deleted file in Excel? Miranda Excel Discussion (Misc queries) 2 September 15th 06 12:59 AM
WHY DOES A MENU COMMAND NOT STAY PERMANENTLY DELETED KYBIGGS Excel Discussion (Misc queries) 1 June 22nd 06 12:56 AM
deleted accidentally a document in excel Lucy Excel Discussion (Misc queries) 2 March 7th 06 11:42 AM


All times are GMT +1. The time now is 11:59 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"