option explicit
public sub border_()
range("d9:g15").select
selection.borders(xlDiagonalDown ).lineStyle = xlNone
selection.borders(xlDiagonalUp ).lineStyle = xlNone
selection.borders(xlInsideVertical ).lineStyle = xlNone
selection.borders(xlInsideHorizontal).lineStyle = xlNone
selection.borders(xlEdgeLeft ).lineStyle = xlContinuous
selection.borders(xlEdgeLeft ).weight = xlMedium
selection.borders(xlEdgeLeft ).colorIndex = xlAutomatic
selection.borders(xlEdgeTop ).lineStyle = xlContinuous
selection.borders(xlEdgeTop ).weight = xlMedium
selection.borders(xlEdgeTop ).colorIndex = xlAutomatic
selection.borders(xlEdgeBottom ).lineStyle = xlContinuous
selection.borders(xlEdgeBottom ).weight = xlMedium
selection.borders(xlEdgeBottom ).colorIndex = xlAutomatic
selection.borders(xlEdgeRight ).lineStyle = xlContinuous
selection.borders(xlEdgeRight ).weight = xlMedium
selection.borders(xlEdgeRight ).colorIndex = xlAutomatic
end sub