Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("A1:E10")) Is Nothing Then
If Target.Value <> "" Then
With Target.Borders
.LineStyle = xlContinuous
.Weight = xlThick
.ColorIndex = xlAutomatic
End With
Else
With Target.Borders
.LineStyle = xlNone
End With
End If
End If
End Sub
Else
With Target.Borders
.LineStyle = xlNone
End With
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, [B]Range("A1:E1")[/B]) Is Nothing Then
If Target.Value <> "" Then
With [B]Range(Cells(1, Target.Column), Cells(10, Target.Column)).Borders[/B]
.LineStyle = xlContinuous
.Weight = xlThick
.ColorIndex = xlAutomatic
End With
Else
With [B]Range(Cells(1, Target.Column), Cells(10, Target.Column)).Borders[/B]
.LineStyle = xlNone
End With
End If
End If
End Sub