1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
| Sub Macro1()
derl = ActiveSheet.Range("a65536").End(xlUp).Row
Rows(derl & ":" & derl).Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Range(Cells(derl, 1), Cells(derl, 7)).Select
With Selection.Borders(xlEdgeLeft)
.Weight = xlThin
End With
With Selection.Borders(xlEdgeTop)
.Weight = xlThin
End With
With Selection.Borders(xlEdgeBottom)
.Weight = xlThin
End With
With Selection.Borders(xlEdgeRight)
.Weight = xlThin
End With
With Selection.Borders(xlInsideVertical)
.Weight = xlThin
End With
With Selection.Borders(xlInsideHorizontal)
.Weight = xlThin
End With
Range(Cells(derl + 1, 1), Cells(derl + 1, 7)).Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.Weight = xlMedium
End With
With Selection.Borders(xlEdgeTop)
.Weight = xlMedium
End With
With Selection.Borders(xlEdgeBottom)
.Weight = xlMedium
End With
With Selection.Borders(xlEdgeRight)
.Weight = xlMedium
End With
With Selection.Borders(xlInsideVertical)
.Weight = xlThin
End With
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
Cells(derl + 2, 1).Select
End Sub |
Partager