PC Review


Reply
Thread Tools Rate Thread

culture mismatch with Button name and get_Caller

 
 
EBenson
Guest
Posts: n/a
 
      9th Jul 2009

Running in Excel 2007 with culture zh-Ch.

I create an Excel button from my COM C# add-in using _combo =
worksheet.Shapes.AddFormControl(Excel.XlFormControl.xlButtonControl, 0, 0, 0,
0);

This defaults to an English string name "Button 1".

When this button is clicked. It runs an action that is in a .xla Within this
..xla application.Caller is a string that is the Chinese equivalent to "Button
1".

The xla calls back into the C# add-in and using the Excel applications
object I call get_Caller(System.Missing). This also returns the button name
in Chinese.

How can I ensure these are in a consistent culture?

--
EB
 
Reply With Quote
 
 
 
 
EBenson
Guest
Posts: n/a
 
      9th Jul 2009

if I assign the Shape a name other than some form of "Button 1", "Button 1"
( notice extra space) , Excel will return the English version

Excel.Shape shape;

// create shape

shape = Worksheet.Shapes.AddFormControl ....
shape.Name = "BUTTON1"; // returns as is
= "Button 2"; // returns as is
= "dog"; // returns as is
= "Button 1" // translated

I could hypothesize on key word is "Button" for Shapes or maybe because I
used xlButtonControl, "1" is the count or id used by Excel.


--
EB


"EBenson" wrote:

> Running in Excel 2007 with culture zh-Ch.
>
> I create an Excel button from my COM C# add-in using _combo =
> worksheet.Shapes.AddFormControl(Excel.XlFormControl.xlButtonControl, 0, 0, 0,
> 0);
>
> This defaults to an English string name "Button 1".
>
> When this button is clicked. It runs an action that is in a .xla Within this
> .xla application.Caller is a string that is the Chinese equivalent to "Button
> 1".
>
> The xla calls back into the C# add-in and using the Excel applications
> object I call get_Caller(System.Missing). This also returns the button name
> in Chinese.
>
> How can I ensure these are in a consistent culture?
>
> --
> EB

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Could not find any resources appropriate for the specified culture or the neutral culture EricW Microsoft Dot NET 3 23rd May 2008 06:49 PM
Could not find any resources appropriate for the specified culture or the neutral culture EricW Microsoft VB .NET 3 23rd May 2008 06:49 PM
[MissingManifestResourceException: Could not find any resources appropriate for the specified culture or the neutral culture. Rob Dob Microsoft ASP .NET 0 27th Nov 2005 03:57 PM
[MissingManifestResourceException: Could not find any resources appropriate for the specified culture or the neutral culture. Rob Dob Microsoft C# .NET 0 27th Nov 2005 03:57 PM
Culture ID 33280 (0x8200) is not a supported culture =?Utf-8?B?TWFjcm9tdWxsZXQ=?= Microsoft ADO .NET 0 14th Dec 2004 02:59 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:57 AM.