Habe unteres Makro das mir ab A6:L einen Rahmen setzt.
Ich möchte gerne wenn zb. in A10 ein Wert steht,das mir dann in A11:L11 der Rahmen gesetzt wird.
Also immer immer die nächste leere Zelle von A.
Könnte mir dazu bitte jemand helfen?
Gruß
Heinz
Private Sub CommandButton2_Click()
Application.ScreenUpdating = False
Range("A6:L" & Cells(Rows.Count, 1).End(xlUp).Row).Select
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlHairline
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlHairline
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlHairline
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlHairline
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.Weight = xlHairline
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlInsideVertical)
.LineStyle = xlContinuous
.Weight = xlHairline
.ColorIndex = xlAutomatic
End With
Application.ScreenUpdating = True
End Sub