René Nyffenegger's collection of things on the web
René Nyffenegger on Oracle - Most wanted - Feedback -
 

borders [Excel macro]

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