I have a vba code to fill dynamically conditionnal formatting. The problem is that my code works fine on english version of Excel, but if I send to someone with the french excel version, it's giving them an error. I realized that the problem is that I put in my vba code a comma ',' in english version, but in french version it excpects a ";" separator to work.
How can I solve this so that my code works on any excel version ? I can't create an excel for each user, based on his local version.
To make things clear so that you may help :
here is the part of my code that is causing me the problem
sFormula is a string contaning :
sFormula=AND(OR($AP14="",$AR14=""),NOT($C14=""))
Range(sMyRange).FormatConditions.Add Type:=xlExpression, Formula1:=sFormula
In enlglish version of Excel All works fine
In french version I have to replace in my VBA code the ',' in sFormula by ';' to makes it work, otherwise I get a runtime error when the Macro code is executed
If I replace in my code the previous sFormula, by the following one (just changing the , by ;) it works fine on french version
sFormula=AND(OR($AP14="";$AR14="");NOT($C14=""))
Thanks in advance for your help.