Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default culture mismatch with Button name and get_Caller


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.XlFormContro l.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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default culture mismatch with Button name and get_Caller


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.XlFormContro l.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
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
Culture problem with Excel english version Hichem S Excel Programming 0 August 5th 08 10:57 PM
type mismatch Craig[_24_] Excel Programming 1 August 1st 06 05:35 PM
Type Mismatch teresa Excel Programming 10 December 28th 04 10:14 PM
Type mismatch teresa Excel Programming 1 December 14th 04 11:19 PM
Mismatch!? Bob[_21_] Excel Programming 1 July 11th 03 02:39 PM


All times are GMT +1. The time now is 06:16 PM.

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

About Us

"It's about Microsoft Excel"