View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ming Zhao[_2_] Ming Zhao[_2_] is offline
external usenet poster
 
Posts: 3
Default How to translate Excel formula function name to another language?

I am developing an Excel application in VS2005 for a multi-language
environment. The application writes a formula to an Excel cell from VB code
compiled as a dll, such as MyCell.Formula = €œ=POWER(A1,B2)€

It works for English but when I select Spanish from the Windows Regional
and Language Options it will show #NAME? error in MyCell. I notice if I enter
the formula directly into Excel, save and reopen the workbook after selecting
Spanish, then POWER will be automatically translated to POTENCIA.

How to use this automatic translation capability of Excel in VB code? My
code obviously does not work because it uses absolute text string.