Re: Difference between range.formula and range.formulalocal

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Andy (bikejog_at_hotmail.com)
Date: 05/01/04


Date: 30 Apr 2004 20:30:25 -0700

I have a feeling that you might have misundertood what
I meant. What I want to accomplish is to override the
Application_BeforeDoubleClick(..) function to find out
what formula (if any) the double-clicked cell contains.
So

   '
   ' the prototype for status routine is
   ' Function status(i as integer, j as integer) as integer
   '
   if InStr(activeCell.Formula, "=status(") = 1 Then
       MsgBox("It's a Cell containing a call to the function status(i,j)");
   Else
       MsgBox("It's Not")
   End If

   In this example, I should be using the .Formula proporty and
not the .FormulaLocal proporty correct? Because .FormulaLocal
proporty would return something different depending on which
region Excel is. Correct? eg, in Europe .FormulaLocal would
return something like "=status(1;2)" and in the US, it would
return something like "=status(1,2)". So is it correct to say
that .Formula is more portable?

Andy

"Tom Ogilvy" <twogilvy@msn.com> wrote in message news:<eB$XMTuLEHA.268@TK2MSFTNGP11.phx.gbl>...
> You have to write the macro in English in xl97 and later.
>
> Use formula if you are going to pass it a string that would work in an
> English Version of Excel. Use formulalocal if you will pass it a string
> that will work in your regional version. This includes use of list
> separators (comma versus period as an example).
>
> --
> Regards,
> Tom Ogilvy
>
> "Andy" <bikejog@hotmail.com> wrote in message
> news:aed59298.0404301049.5e951ace@posting.google.com...
> > Hi,
> > If I'm writing a macro to check for the formula in a cell,
> > which proporty should I be using to be internationally
> > portable.
> > Say if I write the macro in English, I should be using
> > the formula proporty and not the FormulaLocal property
> > right?
> >
> > Thanks
> > Andy



Relevant Pages

  • Re: Difference between range.formula and range.formulalocal
    ... You have to write the macro in English in xl97 and later. ... Use formulalocal if you will pass it a string ... > the formula proporty and not the FormulaLocal property ...
    (microsoft.public.excel.programming)
  • Using Japanese and English strings, encodings
    ... How do I get a macro to turn into NOTHING at all (not ... English, and I keep wishing I could closely, reliable, and simply ... appropriate string. ... It keeps screwing up the EUC-JP encoding of any parameters I ...
    (comp.lang.lisp)