View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
keepITcool keepITcool is offline
external usenet poster
 
Posts: 2,253
Default Multilanguage translation


I tested it also with functions in the strings..
although localized functions and localized R1C1 are accepted...

I think you should stick to A1 references & functions in usenglish)
Relative refs will be correct if written for for the first cell in
range.


With Range("A6:A100")
.FormatConditions.Delete
.FormatConditions.Add Type:=xlExpression, Formula1:="=RC6=100%"
.FormatConditions(1).Font.Strikethrough = True
.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=($B$4=$B6)*($B6+$C6=$B$4)*($B6<"""")"
'.FormatConditions.Add Type:=xlExpression, Formula1:= _
Application.ConvertFormula( _
"RC6<1)*(RC2+RC3<=R4C2)*(RC2<"""")", xlR1C1, xlA1, , .Cells(1))
With .FormatConditions(2).Font
.Bold = True
.Italic = False
.ColorIndex = 3
End With
.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=($B$4=$B6)*($B6+$C6=$B$4)*($B6<"""")"
'.FormatConditions.Add Type:=xlExpression, Formula1:= _
Application.ConvertFormula( _
"=(R4C2=RC2)*(RC2+RC3=R4C2)*(RC2<"""")", xlR1C1, xlA1, ,
..Cells(1))

With .FormatConditions(3).Font
.Bold = True
.Italic = False
.Strikethrough = False
.ColorIndex = 5
End With
End With




--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Simon wrote :

Hi,
I need to adapt a German VB script used in Excel into a version which
will work in Europe. The problem is that the Line/Colon references
have different names in the different countries. How can I easily
adapt a script into a multilanguage version?

Here an extract of the German Version with ZS references:

'Mise en forme conditionnelle première colonne
With Range("A6:A" + CStr(Range("LastLine").Value + 5))
.FormatConditions.Delete
.FormatConditions.Add Type:=xlExpression, Formula1:="=ZS6=100%"
.FormatConditions(1).Font.Strikethrough = True
.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=(ZS6<1)*(ZS2+ZS3<=Z4S2)*(ZS2<"""")"
With .FormatConditions(2).Font
.Bold = True
.Italic = False
.ColorIndex = 3
End With
.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=(Z4S2=ZS2)*(ZS2+ZS3=Z4S2)*(ZS2<"""")"
With .FormatConditions(3).Font
.Bold = True
.Italic = False
.Strikethrough = False
.ColorIndex = 5
End With
End With