Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

There was a very bad (imo) design decision to replace the parameter delimiter, mandatorily a semicolon in old days, for locales where the comma not is used as the decimal separator by the comma by default.
You supposed you can delimit parameters by commas now, too. I suppose you either
-1- have set a locale where the comma is the decimal separator or -2- have wisely set the semicolon as you parameter ("function") delimiter in 'Options' > 'LibreOffice Calc' > 'Formula' > 'Separators' to avoid useless problems across locales or -3- are using a rather old version of LibO where the semicolon is still mandatory in the role.

If writing a Calc formula in BASIC, it is a string which must regard exactly the syntax for the formula.

(Your Sub works for me with the semicolon instead of the comma.)

There was a very bad (imo) design decision to replace the parameter delimiter, mandatorily a semicolon in old days, for locales where the comma not is used as the decimal separator by the comma by default.
You supposed you can delimit parameters by commas now, too.
I suppose you either
-1- have set a locale where the comma is the decimal separator or or
-2- have wisely set the semicolon as you parameter ("function") delimiter in 'Options' > 'LibreOffice Calc' > 'Formula' > 'Separators' to avoid useless problems across locales or or
-3- are using a rather old version of LibO where the semicolon is still mandatory in the role.

If writing a Calc formula in BASIC, it is a string which must regard exactly the syntax for the formula.

(Your Sub works for me with the semicolon instead of the comma.) comma.)

There was a very bad (imo) design decision to replace the parameter delimiter, mandatorily a semicolon in old days, for locales where the comma not is used as the decimal separator by the comma by default.
You supposed you can delimit parameters by commas now, too.
I suppose you either
-1- have set a locale where the comma is the decimal separator or
-2- have wisely set the semicolon as you your parameter ("function") delimiter in 'Options' > 'LibreOffice Calc' > 'Formula' > 'Separators' to avoid useless problems across locales or
-3- are using a rather old version of LibO where the semicolon is still mandatory in the role.

If writing a Calc formula in BASIC, it is a string which must regard exactly the syntax for the formula.

(Your Sub works for me with the semicolon instead of the comma.)

There was a very bad (imo) design decision to replace the parameter delimiter, mandatorily a semicolon in old days, for locales where the comma not is used as the decimal separator by the comma by default.
You supposed you can delimit parameters by commas now, too.
too - and everywhere.

In fact still the semicolon is used as parameter delimiter in Calc. Only for the localized version shown in the 'FormulaBar' and for the diplay in cells it is replaced by the comma under certain conditions.
If you insist to use the comma in your BASIC-hosted formulas you need to assign it to the .FormulaLocal proberty of the target cell. Better get back to the semicolon as the parameter delimiter. There may be a case one day for applying the .SetFormulaArray(FA) e.g. and there is no FormulaLocalArray.

Down with that silly localizeritis! There may also occur problems with localized function names and with add-in functions.

I suppose you either
-1- have set a locale where the comma is the decimal separator or
-2- have wisely set the semicolon as your parameter ("function") delimiter in 'Options' > 'LibreOffice Calc' > 'Formula' > 'Separators' to avoid useless problems across locales or
-3- are using a rather old version of LibO where the semicolon is still mandatory in the role.

role. If writing a Calc formula in BASIC, it is a string which must regard exactly the syntax for the formula.

(Your Sub works for me with the semicolon instead of the comma.)

comma.)

After some

There was a very bad (imo) design decision to replace the parameter delimiter, mandatorily a semicolon in old days, for locales where the comma not is used as the decimal separator by the comma by default.
You supposed you can delimit parameters by commas now, too - and everywhere.

In fact still the semicolon is used as parameter delimiter in Calc. Only for the localized version shown in the 'FormulaBar' and for the diplay in cells it is replaced by the comma under certain conditions.
If you insist to use the comma in your BASIC-hosted formulas you need to assign it them to the .FormulaLocal proberty property of the target cell. Better get back to the semicolon as the parameter delimiter. There may be a case one day for applying the .SetFormulaArray(FA) e.g. and there is no FormulaLocalArray.

Down with that silly localizeritis! There may also occur problems with localized function names and with add-in functions.

I suppose you either
-1- have set a locale where the comma is the decimal separator or
-2- have wisely set the semicolon as your parameter ("function") delimiter in 'Options' > 'LibreOffice Calc' > 'Formula' > 'Separators' to avoid useless problems across locales or
-3- are using a rather old version of LibO where the semicolon is still mandatory in the role.
If writing a Calc formula in BASIC, it is a string which must regard exactly the syntax for the formula.

(Your Sub works for me with the semicolon instead of the comma.)

After some