ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Format Cell- Border Line (https://www.excelbanter.com/excel-programming/372202-format-cell-border-line.html)

Benz

Format Cell- Border Line
 
I was hoping someone can help me figure out code that will format the
selected cell with a thick-diagonal red line through it.

Thank you to anyone who helps :)

Bill Pfister[_2_]

Format Cell- Border Line
 
With Selection.Borders(xlDiagonalDown)
.LineStyle = xlContinuous
.Weight = xlThick
.ColorIndex = 3
End With


"Benz" wrote:

I was hoping someone can help me figure out code that will format the
selected cell with a thick-diagonal red line through it.

Thank you to anyone who helps :)


Jim Thomlinson

Format Cell- Border Line
 
Try this...

Sub RedDiagonal()
With ActiveCell.Borders(xlDiagonalUp)
.LineStyle = xlContinuous
.Weight = xlThick
.ColorIndex = 3
End With
End Sub
--
HTH...

Jim Thomlinson


"Benz" wrote:

I was hoping someone can help me figure out code that will format the
selected cell with a thick-diagonal red line through it.

Thank you to anyone who helps :)


Benz

Format Cell- Border Line
 
Thank You!!

"Jim Thomlinson" wrote:

Try this...

Sub RedDiagonal()
With ActiveCell.Borders(xlDiagonalUp)
.LineStyle = xlContinuous
.Weight = xlThick
.ColorIndex = 3
End With
End Sub
--
HTH...

Jim Thomlinson


"Benz" wrote:

I was hoping someone can help me figure out code that will format the
selected cell with a thick-diagonal red line through it.

Thank you to anyone who helps :)



All times are GMT +1. The time now is 02:05 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com