mit unterstehende code werden nach eingabe in spalte C Rahmen gesetzt von zellbereich A bis H
mein Problem, ich schaffe es nicht, -das Rahmen nur gesetz werden im bereich A10:H999
mit If Intersect(Target, Range("C10:C999")) Is Nothing Then Exit Sub funktioniert nicht zum 100 Prozent
Private Sub Worksheet_Change(ByVal Target As Range)
Dim lngZ As Long
Dim Bereich As Range
Application.ScreenUpdating = False
Start = 10
'Bestehende Linien löschen
If Intersect(Target, Range("C10:C999")) Is Nothing Then Exit Sub
With Columns("A:H")
.Borders.LineStyle = xlNone
.Borders(xlDiagonalDown).LineStyle = xlNone
.Borders(xlDiagonalUp).LineStyle = xlNone
End With
For lngZ = 1 To Range("C65536").End(xlUp).Row
If Cells(lngZ, 3) Cells(3) Then
With Range(Cells(lngZ, 1), Cells(lngZ, 8)).Borders '(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
End If
Next
Application.ScreenUpdating = True
End Sub
Grüße
Karel