View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Deleting "Arrange Side by Side with..." command from Window me

Hi Peter

See my page about this (also the KB's on the bottom)
http://www.rondebruin.com/menuid.htm


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


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

Absolutely superb! Thanks a lot.

I don't suppose you know where there's a definitive list of those IDs and
the controls that they apply to, is there? Do the IDs change for different
versions of Excel?

Thanks VERY much

Pete



"Ron de Bruin" wrote:

Is this working for you

Sub test()
Dim Ctl As CommandBarControl
For Each Ctl In Application.CommandBars("Worksheet Menu Bar").FindControl(ID:=30009).Controls
On Error Resume Next
'Ctl.Enabled = False
Ctl.Delete
On Error GoTo 0
Next Ctl
End Sub

Sub test2()
Application.CommandBars("Worksheet Menu Bar").FindControl(ID:=30009).Reset
End Sub



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


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

No, I can't.

Pete

"Tom Ogilvy" wrote:

try opening a second workbook (so two are opened) so it is not grayed. Then
see if you can delete it.

--
Regards,
Tom Ogilvy


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

It's there, but it's greyed out - I would like to remove it altogether.

Cheers

Pete



"Tom Ogilvy" wrote:

If there is only one window, then this menu choice is disabled. So
perhaps
this is the source of your problem.

--
Regards,
Tom Ogilvy

"Peter Rooney" wrote in message
...
Good afternoon,

Can anyone suggest why I can delete all the other commands from the
Windows
menu bar, apart from this one. I just want to be able to display the
list
of
currently open workbooks, but don't seem to be able to get rid of this
command.

The syntax I'm using is:

cbMainMenuBar.Controls("Window").Controls("Compare Side by Side
with...").Delete

Thanks in advance

Pete