I have to apply the EXTERNAL border to the cells.
the editor output error
Dim X As Long, Y As Long
X = Cells(Rows.Count, 1).End(xlUp).ROW
Range("E:F").Select
' AT THE FOLLOWING LINE THE EDITOR FINDS ERROR
Do Until activesheet.cell ""
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
Loop
End Sub
HOW CAN I FIX THIS CODE TO SOLVE THE MISTAKE?
THANK YOU!
Bookmarks