ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Deleting "Arrange Side by Side with..." command from Window menuba (https://www.excelbanter.com/excel-programming/347321-deleting-arrange-side-side-command-window-menuba.html)

Peter Rooney

Deleting "Arrange Side by Side with..." command from Window menuba
 
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



Tom Ogilvy

Deleting "Arrange Side by Side with..." command from Window menuba
 
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





Peter Rooney

Deleting "Arrange Side by Side with..." command from Window me
 
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






Tom Ogilvy

Deleting "Arrange Side by Side with..." command from Window me
 
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








Peter Rooney

Deleting "Arrange Side by Side with..." command from Window me
 
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









Ron de Bruin

Deleting "Arrange Side by Side with..." command from Window me
 
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











Peter Rooney

Deleting "Arrange Side by Side with..." command from Window me
 
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












Ron de Bruin

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















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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com