Sub 罫線を引くぜ()
' 外枠と内側の罫線の種類
Range("B2:D8").Select
With Selection.Borders(xlEdgeLeft) '外枠左罫線
.LineStyle = xlContinuous
.Weight = xlThin
End With
With Selection.Borders(xlEdgeTop) '外枠上罫線
.LineStyle = xlContinuous
.Weight = xlThin
End With
With Selection.Borders(xlEdgeBottom) '外枠下罫線
.LineStyle = xlContinuous
.Weight = xlThin
End With
With Selection.Borders(xlEdgeRight) '外枠右罫線
.LineStyle = xlContinuous
.Weight = xlThin
End With
With Selection.Borders(xlInsideVertical) '内側垂直線
.LineStyle = xlContinuous
.Weight = xlHairline
End With
With Selection.Borders(xlInsideHorizontal) '内側水平線
.LineStyle = xlContinuous
.Weight = xlHairline
End With
'表題の下の二重線
Range("B2:D2").Select
With Selection.Borders(xlEdgeBottom) '外枠下罫線
.LineStyle = xlDouble
.Weight = xlThick
End With
'合計上の二重線
Range("B7:D7").Select
With Selection.Borders(xlEdgeBottom) '外枠下罫線
.LineStyle = xlDouble
.Weight = xlThick
End With
Range("D8").Select
End Sub |