Ik heb hier een macro gemaakt in 2007 en daar zit een voorwaardelijke opmaak in die niet
in 2003 wil werken kan iemand dan misschien helpen met het omvormen zodat het wel
in 2003 zal werken???
Ik denk zelf dat het aan de kleurcodes ligt maar het kan natuurlijk ook nog ergens anders aan liggen.
Greetz AvA
in 2003 wil werken kan iemand dan misschien helpen met het omvormen zodat het wel
in 2003 zal werken???
Ik denk zelf dat het aan de kleurcodes ligt maar het kan natuurlijk ook nog ergens anders aan liggen.
Code:
Range("D5").Select
Selection.NumberFormat = "General"
Range("D5").Activate
Selection.FormatConditions.Add Type:=xlExpression, Formula1:="=$B5=WAAR"
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.ColorIndex = 44
.TintAndShade = 0
End With
Selection.FormatConditions(1).StopIfTrue = True
Range("D6:D34").Select
Range("D5").Activate
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlGreaterEqual _
, Formula1:="=8"
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
With Selection.FormatConditions(1).Font
.Bold = True
.Italic = False
.ColorIndex = 4
.TintAndShade = 0
.ThemeFont = xlThemeFontNone
End With
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.ColorIndex = 16
.TintAndShade = 0
End With
Selection.FormatConditions(1).StopIfTrue = True
Range("D6:D34").Select
Range("D5").Activate
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlLessEqual, _
Formula1:="=4"
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
With Selection.FormatConditions(1).Font
.Bold = True
.Italic = False
.ColorIndex = 3
.TintAndShade = 0
.ThemeFont = xlThemeFontNone
End With
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.ColorIndex = 16
.TintAndShade = 0
End With
Selection.FormatConditions(1).StopIfTrue = True
Range("D6:D34").Select
Range("D5").Activate
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlEqual, _
Formula1:="=""-"""
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
With Selection.FormatConditions(1).Font
.Bold = False
.Italic = False
.ColorIndex = xlAutomatic
.TintAndShade = 0
.ThemeFont = xlThemeFontNone
End With
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.ColorIndex = 16
.TintAndShade = 0
End With
Selection.FormatConditions(1).StopIfTrue = True
Range("D5").Select
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlEqual, _
Formula1:="=""-"""
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.Color = 8421504
.TintAndShade = 0
End With
Selection.FormatConditions(1).StopIfTrue = True
Range("D5").Select
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlLessEqual, _
Formula1:="=4"
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
With Selection.FormatConditions(1).Font
.Bold = True
.Italic = False
.Color = -16776961
.TintAndShade = 0
End With
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.Color = 8421504
.TintAndShade = 0
End With
Selection.FormatConditions(1).StopIfTrue = True
Range("D5").Select
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlGreaterEqual _
, Formula1:="=8"
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
With Selection.FormatConditions(1).Font
.Bold = True
.Italic = False
.Color = -16711936
.TintAndShade = 0
End With
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.Color = 8421504
.TintAndShade = 0
End With
Selection.FormatConditions(1).StopIfTrue = True
Greetz AvA