View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Ludo Ludo is offline
external usenet poster
 
Posts: 74
Default alternate rowshading using conditional format excel 2007/2010


<SNIP


Hi all,

Found the problem!

I'm used to work on a English version of Excel at my work, but at home i use a Dutch Office version, witch cause the problem.

When i change the formula to the Dutch equivalent of the English one, it's working.
See below:
Sub Macro7()
Selection.FormatConditions.Add Type:=xlExpression, Formula1:="=REST(RIJ();2)=0"
Selection.FormatConditions(Selection.FormatConditi ons.Count).SetFirstPriority
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
End With
Selection.FormatConditions(1).StopIfTrue = False
End Sub

But what i don't understand now is the fact that even i write the formula in Dutch in the Conditional format form, that it isn't translated to English in the VBA code. This means that when i want to use this VBA code on a English machine that i have to change the formula in English to get it working..

I was convinced that writing VBA code in English could be run on any machine with a different default language.

I can't follow anymore.
Weird behaviour, or i'm missing something crucial here.

&gt; Regards,
&gt; Ludo