View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Disabling and re-enabling the Cell Shortcut menu

Search in hidden folders also Peter

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Peter Rooney" wrote in message ...
Ron,

The only xlb file I have is "Symbols.xlb" which is in my SAP program file
folder.
Other than that, I've scanned both my hard drive and there's nothing there.
I'm using Excel 2003.
Spooky!

Pete


"Ron de Bruin" wrote:

Hi Peter

The enabling code must work

I think you xlb is corrupt ?
*********************
Maybe you have a corrupt or bloated xlb file *normal* size is < 30 kb.
The .xlb file has all Toolbar customization in it.

1. Close Excel
2. Do a search for .xlb in Windows (Use: search hidden files and folders)
3. Rename or delete the .xlb file or files (In 2002 the name = Excel10.xlb)
4. Start Excel

Deleting the file or renaming will do no harm on your system
Excel will create a new one for you.
(You lost your customization remember that)

If you make your own toolbars or add buttons to the others
this file is important (backup it so you can restore it)


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Peter Rooney" wrote in message
...
Good morning all,
I use the following code to disable the cell chortcut menu:

Sub CellMenuCustomize()
Dim SCCellMenu As CommandBar
On Error Resume Next
On Error GoTo 0
Set SCCellMenu = CommandBars("Cell")
SCCellMenu.Reset
SCCellMenu.Enabled = False
End Sub

I use the following code to re-enable it:

Sub CellMenuReset()
Application.CommandBars("Cell").Enabled = True
Application.CommandBars("Cell").Reset
End Sub

However, when I run the disabling code and right click on a cell, I see a
small pale blue square with nothing written in it, and when I run the
enabling code, I STILL only see the square - the menu doesn't reset.
Can anyone tell me what I'm doing wrong?
Thanks in advance.

Pete