Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi All
To format the outer borders of a selection, I use this code: A = 3 Range("C34:J42").Select With Selection.Borders(xlEdgeLeft) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = A End With With Selection.Borders(xlEdgeTop) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = A End With With Selection.Borders(xlEdgeBottom) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = A End With With Selection.Borders(xlEdgeRight) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = A End With It's very cumbersome, but I have had no success trying to compact it. Is it possible to combine the 4 borders into a single statement, and then apply the 3 format lines just once? Regards - Dave. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Border Limitations for Conditional Formats | New Users to Excel | |||
border on last cell of page effects border on beginning cell of ne | Excel Discussion (Misc queries) | |||
Can two formats be applied to a cell with a diagonal border | Excel Discussion (Misc queries) | |||
Changing the border of one cell s/n change the border of adjacent | Excel Discussion (Misc queries) | |||
Can border formats be locked? | Excel Programming |