Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a VB macro inside of an Excel spreadsheet. To run the macro, I have
created a Menu selection that is situated right before "Help". In my code a look for the index value of the help menu and place my menu before it ... iHelpMenu = _ cbMainMenuBar.Controls("?").Index .. .. .. Set cbcCutomMenu = _ cbMainMenuBar.Controls.Add(Type:=msoControlPopup, _ Befo=iHelpMenu) cbcCutomMenu.Caption = "&Level Load" I now need to do this for Latin-Spanish users. The help menu in this language is "?", so my macro does not work. I could just figure out the number that "Help" is and not bother specifying it, but that would mess someone else up if they have custom menus. So, my question is: How can I figure out the Language of the user first and apply my menu selection as an if...else statement? David |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Use the ID of the Help menu
Sub test() MsgBox Application.CommandBars("Worksheet Menu Bar").FindControl(ID:=30010).Index End Sub -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "David Langschied" wrote in message ... I have a VB macro inside of an Excel spreadsheet. To run the macro, I have created a Menu selection that is situated right before "Help". In my code a look for the index value of the help menu and place my menu before it ... iHelpMenu = _ cbMainMenuBar.Controls("?").Index . . . Set cbcCutomMenu = _ cbMainMenuBar.Controls.Add(Type:=msoControlPopup, _ Befo=iHelpMenu) cbcCutomMenu.Caption = "&Level Load" I now need to do this for Latin-Spanish users. The help menu in this language is "?", so my macro does not work. I could just figure out the number that "Help" is and not bother specifying it, but that would mess someone else up if they have custom menus. So, my question is: How can I figure out the Language of the user first and apply my menu selection as an if...else statement? David |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This was perfect!
Thank you so much! The Tech Net community, as always, came through! "Ron de Bruin" wrote: Use the ID of the Help menu Sub test() MsgBox Application.CommandBars("Worksheet Menu Bar").FindControl(ID:=30010).Index End Sub -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "David Langschied" wrote in message ... I have a VB macro inside of an Excel spreadsheet. To run the macro, I have created a Menu selection that is situated right before "Help". In my code a look for the index value of the help menu and place my menu before it ... iHelpMenu = _ cbMainMenuBar.Controls("?").Index . . . Set cbcCutomMenu = _ cbMainMenuBar.Controls.Add(Type:=msoControlPopup, _ Befo=iHelpMenu) cbcCutomMenu.Caption = "&Level Load" I now need to do this for Latin-Spanish users. The help menu in this language is "?", so my macro does not work. I could just figure out the number that "Help" is and not bother specifying it, but that would mess someone else up if they have custom menus. So, my question is: How can I figure out the Language of the user first and apply my menu selection as an if...else statement? David |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Multiple Languages | Excel Discussion (Misc queries) | |||
VB Macro Menu in two different languages | Excel Programming | |||
different languages | Excel Discussion (Misc queries) | |||
Languages getting muddled | Excel Discussion (Misc queries) | |||
Changing Languages | Excel Discussion (Misc queries) |