ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   CommandBar (https://www.excelbanter.com/excel-programming/334390-commandbar.html)

swiederkehr

CommandBar
 
Hello

How can i disable controls like File - New?

The Code:
- Application.CommandBars["File"].Controls["New..."].Enabled = false;

works fine, but i want to use an index instead of the name "File" like:

- Application.CommandBars[1].Controls[1].Enabled = false;

So i can use different Excel versions (English, German, French,...).

thanks for the help
s. wiederkehr

Ron de Bruin

CommandBar
 
See
http://www.rondebruin.com/menuid.htm



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


"swiederkehr" wrote in message ...
Hello

How can i disable controls like File - New?

The Code:
- Application.CommandBars["File"].Controls["New..."].Enabled = false;

works fine, but i want to use an index instead of the name "File" like:

- Application.CommandBars[1].Controls[1].Enabled = false;

So i can use different Excel versions (English, German, French,...).

thanks for the help
s. wiederkehr




swiederkehr

CommandBar
 

Great site and tutorial.
now it works!

thanks a lot
s. wiederkehr


"Ron de Bruin" wrote:

See
http://www.rondebruin.com/menuid.htm



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


"swiederkehr" wrote in message ...
Hello

How can i disable controls like File - New?

The Code:
- Application.CommandBars["File"].Controls["New..."].Enabled = false;

works fine, but i want to use an index instead of the name "File" like:

- Application.CommandBars[1].Controls[1].Enabled = false;

So i can use different Excel versions (English, German, French,...).

thanks for the help
s. wiederkehr





Ron de Bruin

CommandBar
 
Thanks for the feedback

If you have comments about the page let me know.


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


"swiederkehr" wrote in message ...

Great site and tutorial.
now it works!

thanks a lot
s. wiederkehr


"Ron de Bruin" wrote:

See
http://www.rondebruin.com/menuid.htm



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


"swiederkehr" wrote in message ...
Hello

How can i disable controls like File - New?

The Code:
- Application.CommandBars["File"].Controls["New..."].Enabled = false;

works fine, but i want to use an index instead of the name "File" like:

- Application.CommandBars[1].Controls[1].Enabled = false;

So i can use different Excel versions (English, German, French,...).

thanks for the help
s. wiederkehr







leglouton

CommandBar
 

Hi,

Just one more Problem. I use my own cammandbar creates in vba code and
includes in the main Ecel Bar "Worksheet Menu Bar". But when a graph
object is select my bar disapear. So I cannot use my commanbar to work
with a graphic.
Thanks if you can help me !

Leglouton

Ron de Bruin a écrit:
Thanks for the feedback

If you have comments about the page let me know.




Ron de Bruin

CommandBar
 
There are two menubars

1 = the normal menubar (Worksheet Menu Bar)
2 =the chart menubar

So you must add the menuitems to the chart bar also

The name is Chart Menu Bar




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


"leglouton" wrote in message ...

Hi,

Just one more Problem. I use my own cammandbar creates in vba code and includes in the main Ecel Bar "Worksheet Menu Bar". But
when a graph object is select my bar disapear. So I cannot use my commanbar to work with a graphic.
Thanks if you can help me !

Leglouton

Ron de Bruin a écrit:
Thanks for the feedback

If you have comments about the page let me know.







All times are GMT +1. The time now is 08:39 AM.

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