Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

NumberFormat : General is different in Japan

Status
Not open for further replies.

FamWS

Programmer
Jul 17, 2002
28
0
0
MY
Hi,

I set NumberFormat for a cell to be "General". But it falls when using Excel 2002 Japan version where it uses NumberFormatLocal =?{some japanese word}.

How to tackle the General format in different Office?

Regards,
 
The NumberFormat property uses the same format string in different language versions. In your case it is "General".
NumberFormatLocal does the same in local language, it is text displayed in cell formatting dialog.
They are two different properties that set the same thing, the same is for Formula(Local), Name(Local), RefersTo(Local), Category(Local).

combo
 
Thanks for your reply.

How could I create a macro to format a cell as "General" in a single Excel file that works for different office, like English, Japanese, Korean, etc?

Fam
 
Hi,
set NumberFormat to "General", excel user will see it in local excel language, whatever it is.

combo
 
This is what I did. But the Japanese Excel replies "Cannot setup Range Class Number Format Property".

Any clue?
 
Please post your VBA code.

Cheers, Glenn.

Did you hear about the literalist show-jumper? He broke his nose jumping against the clock.
 
Attached please find the code written in Delphi 7.0:

WorkSheet.XLSheet.Columns[4].NumberFormat := 'General';
 
Ah, Delphi .... don't know a damned thing about it.

Have you tried different syntax methods for the code? ( I really am guessing here )

The VBA syntax is:
ActiveSheet.Columns(4).NumberFormat = "General"

As you can see, there is quite a difference.

Cheers, Glenn.

Did you hear about the literalist show-jumper? He broke his nose jumping against the clock.
 
Thanks for your suggestion.

But I had a better idea. In one of the worksheet of the Excel template, I preset a cell to be General in Number format. During the creation of worksheet at runtime, I assign the numberformatlocal of that cell to the new worksheet. This will ensure it caters for all other language Excels.

Cheers,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top