Jack Nouws
Terugkerende gebruiker
- Lid geworden
- 16 apr 2008
- Berichten
- 1.396
Hallo
Ik heb nu een macro opgenomen om mijn voorwaardelijke opmaak te herstellen. Maar als ik hem wil uitvoeren dan komt er een foutmelding
Wat kan ik hier aan doen?
Met vr gr
Jack
Ik heb nu een macro opgenomen om mijn voorwaardelijke opmaak te herstellen. Maar als ik hem wil uitvoeren dan komt er een foutmelding
Code:
Sub opmaak_herstellen()
With Sheets("dataplant").Range("A3:J150").Select
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=REST(SUBTOTAAL(3;$A$3:$A3);2)=1"
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
With Selection.FormatConditions(1).Borders(xlLeft)
[COLOR="Red"] .LineStyle = xlContinuous[/COLOR]
.ThemeColor = 1
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.FormatConditions(1).Borders(xlRight)
.LineStyle = xlContinuous
.ThemeColor = 1
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.FormatConditions(1).Borders(xlTop)
.LineStyle = xlContinuous
.ThemeColor = 1
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.FormatConditions(1).Borders(xlBottom)
.LineStyle = xlContinuous
.ThemeColor = 1
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorAccent3
.TintAndShade = 0.599963377788629
End With
Selection.FormatConditions(1).StopIfTrue = False
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=REST(SUBTOTAAL(3;$A$3:$A3);2)=0"
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
With Selection.FormatConditions(1).Borders(xlLeft)
.LineStyle = xlContinuous
.ThemeColor = 1
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.FormatConditions(1).Borders(xlRight)
.LineStyle = xlContinuous
.ThemeColor = 1
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.FormatConditions(1).Borders(xlTop)
.LineStyle = xlContinuous
.ThemeColor = 1
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.FormatConditions(1).Borders(xlBottom)
.LineStyle = xlContinuous
.ThemeColor = 1
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorAccent3
.TintAndShade = 0.799981688894314
End With
Selection.FormatConditions(1).StopIfTrue = False
End With
End Sub
Met vr gr
Jack