VBA: Setting the color of borders of cells

  • Thread starter Thread starter Lazer
  • Start date Start date
L

Lazer

How do I set the inside border color of the selected sells to "gra
40%"?

Thanks,
Laze
 
Hi
try recording a macro fot this. I got the following result for this:

sub foo()
With Selection.Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 15
End With
With Selection.Borders(xlInsideVertical)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 15
End With
end sub
 

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