AlexanderBB
Well-known Member
- Joined
- Jul 1, 2009
- Messages
- 2,045
- Office Version
- 2019
- 2010
- Platform
- Windows
After applying a new Interior.Color, how do you keep (or restore) the small dotted borders around each cell ?
I think the OP means "grid lines" (not "cell borders") as these get covered by cell fills and need to be replaced by actual cell borders (which appear above cell fills).Applying an interior.color shouldn't affect the borders, post any code that you are using.
I think the OP means "grid lines" (not "cell borders") as these get covered by cell fills and need to be replaced by actual cell borders (which appear above cell fills).
If I look with a magnifying glass, I see mine are solid too however, to the naked eye, they look finely dotted.Maybe, if yes then still need to know the ranges and preferably (if there is any) the code applying the color even then will have to take a guess with the linestyle as my gridlines are solid not dotted.
With Worksheets("Sheet1").Range("Y:CP")
.ColumnWidth = 3
.Interior.Color = RGB(192, 192, 192)
.Font.Color = vbBlack
.Font.Name = "Arial Narrow"
.Font.Size = 10
End With
Sub MM1()
With Worksheets("Sheet1").Range("Y:CP")
.ColumnWidth = 3
.Interior.Color = RGB(192, 192, 192)
.Font.Color = vbBlack
.Font.Name = "Arial Narrow"
.Font.Size = 10
End With
With Worksheets("Sheet1").Range("Y:CP").Borders
.LineStyle = xlContinuous
.Color = vbBlack
.Weight = xlThin
End With
End Sub
With Worksheets("Sheet1").Range("Y:CP")
.ColumnWidth = 3
.Interior.Color = RGB(192, 192, 192) 'Grey
.Font.Color = vbBlack
.Font.Name = "Arial Narrow"
.Font.Size = 10
End With
With Worksheets("Sheet1").Range("Y:CP").Borders
.LineStyle = xlContinuous
.Color = RGB(218, 220, 221)
.Weight = xlThin
End With
With Worksheets("Sheet1").Range("Y:CP")
.Select
Selection.Borders(xlEdgeRight).LineStyle = xlNone
Selection.Borders(xlInsideVertical).LineStyle = xlNone
End With