Show Gridlines when Filling an Interior Range
Dick Kuslieka at the Daily Dose of Excel recently posted a macro that allows the user to create the illusion of gridlines when filling an interior worksheet range. Thinking this a good addition to my Excel toolbox, I've copied it from Dick's site for reference.
Sub ColorRange()
With Selection
Selection.BorderAround xlContinuous, xlThin, , RGB(192, 192, 192)
If .Columns.Count> 1 Then
With .Borders(xlInsideVertical)
.LineStyle = xlContinuous
.Weight = xlThin
.Color = RGB(192, 192, 192)
End With
End If
If .Rows.Count> 1 Then
With .Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.Weight = xlThin
.Color = RGB(192, 192, 192)
End With
End If
End With
End Sub
Posted on Thursday, October 29, 2009 |
Comments (0) |
Permalink

