Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default VB Macro Menu in two different languages

David,

Application.LanguageSettings.LanguageID(msoLanguag eIDHelp)

will return a long - for me, US English - it returns 1033.

You could use code like:

Dim myLan As Long
myLan = Application.LanguageSettings.LanguageID(msoLanguag eIDHelp)
.....
cbcCutomMenu.Caption = IIF(myLan = 1033,"&Level Load",IIF(myLan = Othervalue,"&Other words for
Level Load","&Default Value"))


HTH,
Bernie
MS Excel MVP


"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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple Languages Infexus Bytez Excel Discussion (Misc queries) 1 March 30th 10 05:18 PM
different languages Matt Excel Discussion (Misc queries) 0 June 19th 07 03:36 PM
Decimal format in 2 languages Maureen Excel Discussion (Misc queries) 4 January 9th 07 06:42 PM
Languages getting muddled Roger PB Excel Discussion (Misc queries) 0 March 12th 05 02:53 PM
Changing Languages Jamesy Excel Discussion (Misc queries) 3 December 10th 04 03:06 PM


All times are GMT +1. The time now is 12:41 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"