Identifying commandbar names in non-English versions of Excel
Daniel,
I thought that might be the case. I do know that in principle the .Name
property of a CommandBar object should always use its US-English name, as
Commandbars have a LocalName property as well. This is what Help says about
LocalName
Returns the name of a built-in command bar as it's displayed in the language
version of the container application, or returns or sets the name of a
custom command bar
The key word here however is should, as, according to a Stephen Bullen, the
localisation of a few languages (notably Dutch) got carried away and
localised the .Name property of some commandbars.
So you have the worst situation in practice.
--
HTH
Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
"Daniel Klann" wrote in message
...
Thanks for your reply Bob but that's not what I'm after. I know how to
find
the commandbar names in my version and if I had a non-English version of
Excel I could answer this without posting here! I need someone who has a
non-English version of Excel to be able to confirm whether or not
commandbars have the same names as the English version; specifically, is
the
worksheet cell context menu called 'Cell'? Or if someone else has had
this
issue and knows the answer that would be cool.
Regards,
Dan
"Bob Phillips" wrote in message
...
Daniel,
Not sure if this is much use to you, but this code prints all the
commandbar
names
Dim cb As CommandBar
For Each cb In CommandBars
Debug.Print cb.Name
Next cb
You would need to figure which non-English name matches the English
version,
and I assume it will work in non-English apps.
--
HTH
Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
"Daniel Klann" wrote in message
...
Hi everybody,
I use code that adds a button to the 'Cell' commandbar (this is the
commandbar that appears when you right click in a worksheet cell). I
want
to ensure that my code will work in all versions of Excel from 97 to
2003
(this has been tested successfully) and in non-English versions of
Excel.
Can anyone tell me if the commandbars names are different in
non-English
versions? If they are then how would I get a reference to the Cell
commandbar in code? I can't use the Index property as it seems to be
different depending on which version one is using. Also, I thought
about
using the FindControl method on one of the Cell commandbar's buttons
and
then getting the Parent property. The problem with this is that each
button
on the Cell commandbar exists on other commandbars so I can't be sure
I'm
getting the right one.
Thanks for any help,
Daniel Klann
|