Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.newusers
|
|||
|
|||
condense code for gridelines
Is there a way to shorten this code a bit. I recorded this macro and just
feel there is a way to condense it, I'm just not sure how. All I'm trying to do is add grid lines to my sheet. This macro formats about 2 dozen pages so the less code the better. Thanks Columns("A:H").Select Selection.Borders(xlDiagonalDown).LineStyle = xlNone Selection.Borders(xlDiagonalUp).LineStyle = xlNone With Selection.Borders(xlEdgeLeft) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeTop) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeBottom) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeRight) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = xlAutomatic End With With Selection.Borders(xlInsideVertical) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = xlAutomatic End With With Selection.Borders(xlInsideHorizontal) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = xlAutomatic End With |
#2
Posted to microsoft.public.excel.newusers
|
|||
|
|||
condense code for gridelines
SITCFanTN wrote: Is there a way to shorten this code a bit. I recorded this macro and just feel there is a way to condense it, I'm just not sure how. All I'm trying to do is add grid lines to my sheet. This macro formats about 2 dozen pages so the less code the better. Thanks Hi SITCFanTN Try: Columns("A:H").Borders.LineStyle = xlContinuous Regards Steve |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
VLOOKUP for Zip Code Ranges | Excel Worksheet Functions | |||
Conform a total to a list of results? | Excel Discussion (Misc queries) | |||
Macro for changing text to Proper Case | Excel Worksheet Functions | |||
Find the cell value in excel by using vb code | Excel Discussion (Misc queries) | |||
close form code | Excel Discussion (Misc queries) |