Bei mir tritt leider der Fehler " " auf. Kann mir bitte jemand helfen :(
hier zur sicherheit der Komplette code:
Sub KTFAbisC()
'
' A1 A1 (Abgerufener Wert in Zelle I1)
'
If Range("I1") = 1 Then
ActiveSheet.Shapes.Range(Array("Oval 3")).Select
With Selection.ShapeRange.Fill
.Visible = msoFalse
.ForeColor.RGB = RGB(255, 0, 0)
.Transparency = 0.8
.Solid
End With
With Selection.ShapeRange.Line
.Visible = msoTrue
.Weight = 1.2
.ForeColor.RGB = RGB(255, 0, 0)
End With
With Selection.ShapeRange.LockAspectRatio = msoTrue
Selection.ShapeRange.Height = 14.1732283465
End With
ElseIf Range("I1") = 0 Then
ActiveSheet.Shapes.Range(Array("Oval 3")).Select
With Selection.ShapeRange.Fill
.Visible = msoFalse
.ForeColor.RGB = RGB(0, 0, 0)
.Transparency = 1
.Solid
End With
With Selection.ShapeRange.Line
.Visible = msoFalse
.Weight = 1.5
.ForeColor.RGB = RGB(0, 0, 0)
.Transparency = 1
End With
With Selection.ShapeRange.LockAspectRatio = msoTrue
Selection.ShapeRange.Height = 24.1732283465
Range("H7").Select
End With
ElseIf Range("I1") = 2 Then
ActiveSheet.Shapes.Range(Array("Oval 3")).Select
With Selection.ShapeRange.Fill
.Visible = msoFalse
.ForeColor.RGB = RGB(255, 0, 0)
.Transparency = 0.65
.Solid
End With
With Selection.ShapeRange.Line
.Visible = msoTrue
.Weight = 1.5
.ForeColor.RGB = RGB(255, 0, 10)
End With
With Selection.ShapeRange.LockAspectRatio = msoTrue
Selection.ShapeRange.Height = 24.1732283465
Range("H7").Select
End With
ElseIf Range("I1") = 3 Then
ActiveSheet.Shapes.Range(Array("Oval 3")).Select
With Selection.ShapeRange.Fill
.Visible = msoFalse
.ForeColor.RGB = RGB(255, 0, 0)
.Transparency = 0.5
.Solid
End With
With Selection.ShapeRange.Line
.Visible = msoTrue
.Weight = 1.5
.ForeColor.RGB = RGB(255, 0, 0)
End With
With Selection.ShapeRange.LockAspectRatio = msoTrue
Selection.ShapeRange.Height = 30.1732283465
Range("H7").Select
End With
ElseIf Range("I1") >= 4 Then
ActiveSheet.Shapes.Range(Array("Oval 3")).Select
With Selection.ShapeRange.Fill
.Visible = msoFalse
.ForeColor.RGB = RGB(255, 0, 0)
.Transparency = 0.4
.Solid
End With
With Selection.ShapeRange.Line
.Visible = msoTrue
.Weight = 1.5
.ForeColor.RGB = RGB(255, 0, 0)
End With
With Selection.ShapeRange.LockAspectRatio = msoTrue
Selection.ShapeRange.Height = 33.1732283465
Range("H7").Select
End With
End If
' ----------------------------------------------------------------------------------------------------- B1 (Abgerufener Wert in Zelle I2)
If Range("I2") = 1 Then
ActiveSheet.Shapes.Range(Array("Oval 4")).Select
With Selection.ShapeRange.Fill
.Visible = msoFalse
.ForeColor.RGB = RGB(255, 0, 0)
.Transparency = 0.8
.Solid
End With
With Selection.ShapeRange.Line
.Visible = msoTrue
.Weight = 1.2
.ForeColor.RGB = RGB(255, 0, 0)
End With
With Selection.ShapeRange.LockAspectRatio = msoTrue
Selection.ShapeRange.Height = 14.1732283465
End With
ElseIf Range("I2") = 0 Then
ActiveSheet.Shapes.Range(Array("Oval 4")).Select
With Selection.ShapeRange.Fill
.Visible = msoFalse
.ForeColor.RGB = RGB(0, 0, 0)
.Transparency = 1
.Solid
End With
With Selection.ShapeRange.Line
.Visible = msoFalse
.Weight = 1.5
.ForeColor.RGB = RGB(0, 0, 0)
.Transparency = 1
End With
With Selection.ShapeRange.LockAspectRatio = msoTrue
Selection.ShapeRange.Height = 24.1732283465
Range("H7").Select
End With
ElseIf Range("I2") = 2 Then
ActiveSheet.Shapes.Range(Array("Oval 4")).Select
With Selection.ShapeRange.Fill
.Visible = msoFalse
.ForeColor.RGB = RGB(255, 0, 0)
.Transparency = 0.65
.Solid
End With
With Selection.ShapeRange.Line
.Visible = msoTrue
.Weight = 1.5
.ForeColor.RGB = RGB(255, 0, 10)
End With
With Selection.ShapeRange.LockAspectRatio = msoTrue
Selection.ShapeRange.Height = 24.1732283465
Range("H7").Select
End With
ElseIf Range("I2") = 3 Then
ActiveSheet.Shapes.Range(Array("Oval 4")).Select
With Selection.ShapeRange.Fill
.Visible = msoFalse
.ForeColor.RGB = RGB(255, 0, 0)
.Transparency = 0.5
.Solid
End With
With Selection.ShapeRange.Line
.Visible = msoTrue
.Weight = 1.5
.ForeColor.RGB = RGB(255, 0, 0)
End With
With Selection.ShapeRange.LockAspectRatio = msoTrue
Selection.ShapeRange.Height = 30.1732283465
Range("H7").Select
End With
ElseIf Range("I2") >= 4 Then
ActiveSheet.Shapes.Range(Array("Oval 4")).Select
With Selection.ShapeRange.Fill
.Visible = msoFalse
.ForeColor.RGB = RGB(255, 0, 0)
.Transparency = 0.4
.Solid
End With
With Selection.ShapeRange.Line
.Visible = msoTrue
.Weight = 1.5
.ForeColor.RGB = RGB(255, 0, 0)
End With
With Selection.ShapeRange.LockAspectRatio = msoTrue
Selection.ShapeRange.Height = 33.1732283465
Range("H7").Select
End With
End If
' ------------------------------------------------------------------------------------------------------- C1 (abgerufener Wert in Zelle I3)
If Range("I3") = 1 Then
ActiveSheet.Shapes.Range(Array("Oval 7")).Select
With Selection.ShapeRange.Fill
.Visible = msoFalse
.ForeColor.RGB = RGB(255, 0, 0)
.Transparency = 0.8
.Solid
End With
With Selection.ShapeRange.Line
.Visible = msoTrue
.Weight = 1.2
.ForeColor.RGB = RGB(255, 0, 0)
End With
With Selection.ShapeRange.LockAspectRatio = msoTrue
Selection.ShapeRange.Height = 14.1732283465
End With
ElseIf Range("I3") = 0 Then
ActiveSheet.Shapes.Range(Array("Oval 7")).Select
With Selection.ShapeRange.Fill
.Visible = msoFalse
.ForeColor.RGB = RGB(0, 0, 0)
.Transparency = 1
.Solid
End With
With Selection.ShapeRange.Line
.Visible = msoFalse
.Weight = 1.5
.ForeColor.RGB = RGB(0, 0, 0)
.Transparency = 1
End With
With Selection.ShapeRange.LockAspectRatio = msoTrue
Selection.ShapeRange.Height = 24.1732283465
Range("H7").Select
End With
ElseIf Range("I3") = 2 Then
ActiveSheet.Shapes.Range(Array("Oval 7")).Select
With Selection.ShapeRange.Fill
.Visible = msoFalse
.ForeColor.RGB = RGB(255, 0, 0)
.Transparency = 0.65
.Solid
End With
With Selection.ShapeRange.Line
.Visible = msoTrue
.Weight = 1.5
.ForeColor.RGB = RGB(255, 0, 10)
End With
With Selection.ShapeRange.LockAspectRatio = msoTrue
Selection.ShapeRange.Height = 24.1732283465
Range("H7").Select
End With
ElseIf Range("I3") = 3 Then
ActiveSheet.Shapes.Range(Array("Oval 7")).Select
With Selection.ShapeRange.Fill
.Visible = msoFalse
.ForeColor.RGB = RGB(255, 0, 0)
.Transparency = 0.5
.Solid
End With
With Selection.ShapeRange.Line
.Visible = msoTrue
.Weight = 1.5
.ForeColor.RGB = RGB(255, 0, 0)
End With
With Selection.ShapeRange.LockAspectRatio = msoTrue
Selection.ShapeRange.Height = 30.1732283465
Range("H7").Select
End With
ElseIf Range("I3") >= 4 Then
ActiveSheet.Shapes.Range(Array("Oval 7")).Select
With Selection.ShapeRange.Fill
.Visible = msoFalse
.ForeColor.RGB = RGB(255, 0, 0)
.Transparency = 0.4
.Solid
End With
With Selection.ShapeRange.Line
.Visible = msoTrue
.Weight = 1.5
.ForeColor.RGB = RGB(255, 0, 0)
End With
With Selection.ShapeRange.LockAspectRatio = msoTrue
Selection.ShapeRange.Height = 33.1732283465
Range("H7").Select
End With
End If
' ------------------------------------------------------------------------------------------------------- D1 (abgerufener Wert in Zelle I4)
If Range("I4") = 1 Then
ActiveSheet.Shapes.Range(Array("Oval 6")).Select
With Selection.ShapeRange.Fill
.Visible = msoFalse
.ForeColor.RGB = RGB(255, 0, 0)
.Transparency = 0.8
.Solid
End With
With Selection.ShapeRange.Line
.Visible = msoTrue
.Weight = 1.2
.ForeColor.RGB = RGB(255, 0, 0)
End With
With Selection.ShapeRange.LockAspectRatio = msoTrue
Selection.ShapeRange.Height = 14.1732283465
End With
ElseIf Range("I4") = 0 Then
ActiveSheet.Shapes.Range(Array("Oval 6")).Select
With Selection.ShapeRange.Fill
.Visible = msoFalse
.ForeColor.RGB = RGB(0, 0, 0)
.Transparency = 1
.Solid
End With
With Selection.ShapeRange.Line
.Visible = msoFalse
.Weight = 1.5
.ForeColor.RGB = RGB(0, 0, 0)
.Transparency = 1
End With
With Selection.ShapeRange.LockAspectRatio = msoTrue
Selection.ShapeRange.Height = 24.1732283465
Range("H7").Select
End With
ElseIf Range("I4") = 2 Then
ActiveSheet.Shapes.Range(Array("Oval 6")).Select
With Selection.ShapeRange.Fill
.Visible = msoFalse
.ForeColor.RGB = RGB(255, 0, 0)
.Transparency = 0.65
.Solid
End With
With Selection.ShapeRange.Line
.Visible = msoTrue
.Weight = 1.5
.ForeColor.RGB = RGB(255, 0, 10)
End With
With Selection.ShapeRange.LockAspectRatio = msoTrue
Selection.ShapeRange.Height = 24.1732283465
Range("H7").Select
End With
ElseIf Range("I4") = 3 Then
ActiveSheet.Shapes.Range(Array("Oval 6")).Select
With Selection.ShapeRange.Fill
.Visible = msoFalse
.ForeColor.RGB = RGB(255, 0, 0)
.Transparency = 0.5
.Solid
End With
With Selection.ShapeRange.Line
.Visible = msoTrue
.Weight = 1.5
.ForeColor.RGB = RGB(255, 0, 0)
End With
With Selection.ShapeRange.LockAspectRatio = msoTrue
Selection.ShapeRange.Height = 30.1732283465
Range("H7").Select
End With
ElseIf Range("I4") >= 4 Then
ActiveSheet.Shapes.Range(Array("Oval 6")).Select
With Selection.ShapeRange.Fill
.Visible = msoFalse
.ForeColor.RGB = RGB(255, 0, 0)
.Transparency = 0.4
.Solid
End With
With Selection.ShapeRange.Line
.Visible = msoTrue
.Weight = 1.5
.ForeColor.RGB = RGB(255, 0, 0)
End With
With Selection.ShapeRange.LockAspectRatio = msoTrue
Selection.ShapeRange.Height = 33.1732283465
Range("H7").Select
End With
End If
' ------------------------------------------------------------------------------------------------------- E1 (abgerufener Wert in Zelle I5, Elipse 17)
If Range("I5") = 1 Then
ActiveSheet.Shapes.Range(Array("Oval 17")).Select
With Selection.ShapeRange.Fill
.Visible = msoFalse
.ForeColor.RGB = RGB(255, 0, 0)
.Transparency = 0.8
.Solid
End With
With Selection.ShapeRange.Line
.Visible = msoTrue
.Weight = 1.2
.ForeColor.RGB = RGB(255, 0, 0)
End With
With Selection.ShapeRange.LockAspectRatio = msoTrue
Selection.ShapeRange.Height = 14.1732283465
End With
ElseIf Range("I5") = 0 Then
ActiveSheet.Shapes.Range(Array("Oval 17")).Select
With Selection.ShapeRange.Fill
.Visible = msoFalse
.ForeColor.RGB = RGB(0, 0, 0)
.Transparency = 1
.Solid
End With
With Selection.ShapeRange.Line
.Visible = msoFalse
.Weight = 1.5
.ForeColor.RGB = RGB(0, 0, 0)
.Transparency = 1
End With
With Selection.ShapeRange.LockAspectRatio = msoTrue
Selection.ShapeRange.Height = 24.1732283465
Range("H7").Select
End With
ElseIf Range("I5") = 2 Then
ActiveSheet.Shapes.Range(Array("Oval 17")).Select
With Selection.ShapeRange.Fill
.Visible = msoFalse
.ForeColor.RGB = RGB(255, 0, 0)
.Transparency = 0.65
.Solid
End With
With Selection.ShapeRange.Line
.Visible = msoTrue
.Weight = 1.5
.ForeColor.RGB = RGB(255, 0, 10)
End With
With Selection.ShapeRange.LockAspectRatio = msoTrue
Selection.ShapeRange.Height = 24.1732283465
Range("H7").Select
End With
ElseIf Range("I5") = 3 Then
ActiveSheet.Shapes.Range(Array("Oval 17")).Select
With Selection.ShapeRange.Fill
.Visible = msoFalse
.ForeColor.RGB = RGB(255, 0, 0)
.Transparency = 0.5
.Solid
End With
With Selection.ShapeRange.Line
.Visible = msoTrue
.Weight = 1.5
.ForeColor.RGB = RGB(255, 0, 0)
End With
With Selection.ShapeRange.LockAspectRatio = msoTrue
Selection.ShapeRange.Height = 30.1732283465
Range("H7").Select
End With
ElseIf Range("I5") >= 4 Then
ActiveSheet.Shapes.Range(Array("Oval 17")).Select
With Selection.ShapeRange.Fill
.Visible = msoFalse
.ForeColor.RGB = RGB(255, 0, 0)
.Transparency = 0.4
.Solid
End With
With Selection.ShapeRange.Line
.Visible = msoTrue
.Weight = 1.5
.ForeColor.RGB = RGB(255, 0, 0)
End With
With Selection.ShapeRange.LockAspectRatio = msoTrue
Selection.ShapeRange.Height = 33.1732283465
Range("H7").Select
End With
End If
' ------------------------------------------------------------------------------------------ F1 (abgerufener Wert in Zelle I6, Elipse 18)
If Range("I6") = 1 Then
ActiveSheet.Shapes.Range(Array("Oval 18")).Select
With Selection.ShapeRange.Fill
.Visible = msoFalse
.ForeColor.RGB = RGB(255, 0, 0)
.Transparency = 0.8
.Solid
End With
With Selection.ShapeRange.Line
.Visible = msoTrue
.Weight = 1.2
.ForeColor.RGB = RGB(255, 0, 0)
End With
With Selection.ShapeRange.LockAspectRatio = msoTrue
Selection.ShapeRange.Height = 14.1732283465
End With
ElseIf Range("I6") = 0 Then
ActiveSheet.Shapes.Range(Array("Oval 18")).Select
With Selection.ShapeRange.Fill
.Visible = msoFalse
.ForeColor.RGB = RGB(0, 0, 0)
.Transparency = 1
.Solid
End With
With Selection.ShapeRange.Line
.Visible = msoFalse
.Weight = 1.5
.ForeColor.RGB = RGB(0, 0, 0)
.Transparency = 1
End With
With Selection.ShapeRange.LockAspectRatio = msoTrue
Selection.ShapeRange.Height = 24.1732283465
Range("H7").Select
End With
ElseIf Range("I6") = 2 Then
ActiveSheet.Shapes.Range(Array("Oval 18")).Select
With Selection.ShapeRange.Fill
.Visible = msoFalse
.ForeColor.RGB = RGB(255, 0, 0)
.Transparency = 0.65
.Solid
End With
With Selection.ShapeRange.Line
.Visible = msoTrue
.Weight = 1.5
.ForeColor.RGB = RGB(255, 0, 10)
End With
With Selection.ShapeRange.LockAspectRatio = msoTrue
Selection.ShapeRange.Height = 24.1732283465
Range("H7").Select
End With
ElseIf Range("I6") = 3 Then
ActiveSheet.Shapes.Range(Array("Oval 18")).Select
With Selection.ShapeRange.Fill
.Visible = msoFalse
.ForeColor.RGB = RGB(255, 0, 0)
.Transparency = 0.5
.Solid
End With
With Selection.ShapeRange.Line
.Visible = msoTrue
.Weight = 1.5
.ForeColor.RGB = RGB(255, 0, 0)
End With
With Selection.ShapeRange.LockAspectRatio = msoTrue
Selection.ShapeRange.Height = 30.1732283465
Range("H7").Select
End With
ElseIf Range("I6") >= 4 Then
ActiveSheet.Shapes.Range(Array("Oval 18")).Select
With Selection.ShapeRange.Fill
.Visible = msoFalse
.ForeColor.RGB = RGB(255, 0, 0)
.Transparency = 0.4
.Solid
End With
With Selection.ShapeRange.Line
.Visible = msoTrue
.Weight = 1.5
.ForeColor.RGB = RGB(255, 0, 0)
End With
With Selection.ShapeRange.LockAspectRatio = msoTrue
Selection.ShapeRange.Height = 33.1732283465
Range("H7").Select
End With
End If
End Sub
|