![]() |
Difference between range.formula and range.formulalocal
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 |
Difference between range.formula and range.formulalocal
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" wrote in message om... 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 |
Difference between range.formula and range.formulalocal
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" wrote in message ... 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" wrote in message om... 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 |
Difference between range.formula and range.formulalocal
Consult the help. It is pretty self explanatory.
-- Regards, Tom Ogilvy "Andy" wrote in message m... 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" wrote in message ... 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" wrote in message om... 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 |
All times are GMT +1. The time now is 07:33 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com