I am trying to make a cell look borderless by coloring the edges white. Here is my code and the goddarn thing does not work. Thanks for correcting it.
Dim cel As Range
For Each cel In Range(Cells(4, 1), Cells(Worksheets("Deliverable-Epic-Story Progress").UsedRange.Rows.Count, 15))
With cel.Borders
If .Item(xlEdgeTop).LineStyle <> xlLineStyleNone Then
.Item(xlEdgeTop).Color = vbWhite
End If
If .Item(xlEdgeBottom).LineStyle <> xlLineStyleNone Then
.Item(xlEdgeBottom).Color = vbWhite
End If
End With
Next
** UPDATE ** Pictures attached if it helps.
I used this code from the link @Big Ben shared.
Private Sub TurnOffGridLines(target As Worksheet)
Dim view As WorksheetView
For Each view In target.Parent.Windows(1).SheetViews
If view.Sheet.Name = target.Name Then
view.DisplayGridlines = False
Exit Sub
End If
Next
End Sub
And I am calling that sub like this and it errors out. My worksheet name is "Deliverable-Epic-Story Progress"
TurnOffGridLines ("Deliverable-Epic-Story Progress")