View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.programming
Luc Benninger[_2_] Luc Benninger[_2_] is offline
external usenet poster
 
Posts: 6
Default translating formulas

If you use SUM in VBA, does this not create SUMME in I1, and then pick that
up for the CF.

No, in VBA, SUM stays SUM if you get the Formula property of the cell.
But FormulaLocal would return the translated formula. And that's exactly
what I tried to do (look at the code in my first post).

As Tom suggests (I think if I read him correctly), you could try putting the
English formula directly into CF.

This does not work.

Anyway, I think I now solved my problem. Here is what I found out:

For the Formula Property of Conditional format object:
Using english formulas does not work, but with the Translate function
from my first post, everything seems ok! This function translates the
formulas into the locale language and replaces commas with the locale
list seperator character.

For the Formula property of a cell:
English may always be used (comma is seperator). If the formulas are
translated into the locale language, commas MUST NOT be replaced with
the local list seperator!!! Quite confusing, not?? As I first was
testing my translate function with cells formula property, I got errors
if the formula expression contained commas.


Thanks again for all input I got.
Luc