Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Format change with VBA language dependent?

When I edit format by code, is that language dependent?

E.g.;

Range(rng).NumberFormat = "General"

"General" is a string and I guess it is called something else in other languages. At least in the user GUI's

But how is it with VBA? Will VBA use the "General" string and translate it into language specific values in the user GUI, or will the code error when a user with other language prefrerences uses it?

If you know this, tell me.

AND - if you in that case also know a good way to make the code language general, please do.


/Thanks a lot
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,872
Default Format change with VBA language dependent?

Hi,

Am Tue, 19 Nov 2013 12:13:46 -0800 (PST) schrieb tskogstrom:

Range(rng).NumberFormat = "General"

"General" is a string and I guess it is called something else in other languages. At least in the user GUI's


VBA "speaks" English in all language versions of Excel.
You only run into problems using Formula.Local
If your workbook should be opened in other language versions than yours
use Formula.


Regards
Claus B.
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Format change with VBA language dependent?

If I understand you correct, the VBA code Range(rng).NumberFormat = "General" works in any language the GUIs have? Right?

Because I suppose [.NuberFormat = "General"] is different than the rest of the VBA code such as; [ .Borders(xlEdgeLeft) ]. The latter sentence clearly shows VBA is based on English, but neither "Borders" nor "EdgeLeft" are strings. My concern was the string "General" and fact it is the same expression in the GUI "General".

I did not quite follow you on your second remark about FormulaLocal, it sounds like the opposite to my needs, i want to have language independent code.. Soo, in that sense, I will run into trouble :-)

Regards
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,872
Default Format change with VBA language dependent?

Hi,

Am Tue, 19 Nov 2013 13:30:27 -0800 (PST) schrieb tskogstrom:

If I understand you correct, the VBA code Range(rng).NumberFormat = "General" works in any language the GUIs have? Right?


yes, that is correct.

Because I suppose [.NuberFormat = "General"] is different than the rest of the VBA code such as; [ .Borders(xlEdgeLeft) ]. The latter sentence clearly shows VBA is based on English, but neither "Borders" nor "EdgeLeft" are strings. My concern was the string "General" and fact it is the same expression in the GUI "General".


Number formats are always in quote marks e.g. "m/d/yyyy" or "0.00"


Regards
Claus B.
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Format change with VBA language dependent?

So the general number format is always "General" in the user GUI, for your German GUI as well as it is in Chinese and all other languages? I didn't know that. And "m/d/yyyy" is the same in the user GUI in chinese etc too, even if it is based on the english expression "month", "day", "year"? You are sure?

Sorry if I make you answering same thing three times but I promise, after this I surely will belive you :-)

/Regards


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,872
Default Format change with VBA language dependent?

Hi,

Am Tue, 19 Nov 2013 13:49:24 -0800 (PST) schrieb tskogstrom:

So the general number format is always "General" in the user GUI, for your German GUI as well as it is in Chinese and all other languages? I didn't know that. And "m/d/yyyy" is the same in the user GUI in chinese etc too, even if it is based on the english expression "month", "day", "year"? You are sure?

Sorry if I make you answering same thing three times but I promise, after this I surely will belive you :-)


yes I am sure. VBA is in all GUIs English. And when I create a date
format I have to use "m/d/yyyy"
The formats I posted in the answer before I have copied from my
VBA-Editor (Excel in German language version).
I have also to use the US standard delimiters. In my sheet I have a
comma as decimal separator but in VBA I have to use the dot.
VBA is international if you don't use Formula.Local


Regards
Claus B.
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Format change with VBA language dependent?

:-)
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
How to change German language data into Eglish Language in a colum Execel work sheet language problems Excel Discussion (Misc queries) 1 October 29th 07 09:59 PM
Change format DATE language Animal via OfficeKB.com Excel Programming 2 October 26th 07 02:24 PM
How can I programatically change the language in the language bar? Roy Barr Excel Programming 0 March 14th 05 09:55 PM
How can I programatically change the language in the language bar? Roy Barr Excel Discussion (Misc queries) 0 March 14th 05 09:47 PM
How to change the excel format from language to language? zee Excel Discussion (Misc queries) 2 January 30th 05 06:51 PM


All times are GMT +1. The time now is 12:28 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"