bottom border color

  • Thread starter Thread starter rp
  • Start date Start date
R

rp

Hi all!,

i use this code to highlight the location of the active cell. my question is
instead of changing the interior color, can i just change the bottom border
color of the cell?

-------------------
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
Range("8:8").Interior.ColorIndex = 1
Range("8:8").Font.ColorIndex = 2
Range("c:c").Interior.ColorIndex = 0
Cells(8, Target.Column).Interior.ColorIndex = 15
Cells(8, Target.Column).Font.ColorIndex = 1
Cells(Target.Row, 3).Interior.ColorIndex = 15
End Sub
 
Try this:

With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = 3
End With

**** Hope it helps! ****

~Dreamboat
Excel VBA Certification Coming Soon!
www.VBAExpress.com/training/
www.Brainbench.com Word Test Developer 2000,2002,2003
********************************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top