After some thought, maybe you would want to be able to remove the borders as
changes are made to the file and re-apply them. This version modifies Joel's
code to allow for the removal of all horizontal borders in column A by
selectin option 3 in the first input box.
Sub Set_Borders()
lastrow = Range("A" & Rows.Count).End(xlUp).Row
BorderLocation = InputBox("Enter Border Location for Row " _
& RowCount & Chr(13) & _
"1= xlEdgeTop" & Chr(13) & _
"2= xlEdgeBottom" & Chr(13) & _
"3= Delete Borders")
If BorderLocation <> "3" Then
LineSize = InputBox("Enter Line Style for Row " & RowCount & _
Chr(13) & _
"1= xlLineStyleNone" & Chr(13) & _
"2= xlContinuous" & Chr(13) & _
"3= xlDash" & Chr(13) & _
"4= xlDashDot" & Chr(13) & _
"5= xlDashDotDot" & Chr(13) & _
"6= xlDot" & Chr(13) & _
"7= xlDouble" & Chr(13) & _
"8= xlSlantDashDot")
LineThick = InputBox("Enter Line Thickness for Row " & RowCount _
& Chr(13) & _
"1= xlHairline" & Chr(13) & _
"2= xlMedium" & Chr(13) & _
"3= xlThick" & Chr(13) & _
"4= xlThin" & Chr(13))
End If
For RowCount = 1 To lastrow
If Range("A" & RowCount).Value <> "" Then
Select Case BorderLocation
Case 1: BorderLoc = xlEdgeTop
Case 2: BorderLoc = xlEdgeBottom
Case 3: GoTo Fini:
End Select
Select Case LineSize
Case 1: LineSz = xlLineStyleNone
Case 2: LineSz = xlContinuous
Case 3: LineSz = xlDash
Case 4: LineSz = xlDashDot
Case 5: LineSz = xlDashDotDot
Case 6: LineSz = xlDot
Case 7: LineSz = xlDouble
Case 8: LineSz = xlSlantDashDot
End Select
Select Case LineThick
Case 1: LineTh = xlHairline
Case 2: LineTh = xlMedium
Case 3: LineTh = xlThick
Case 4: LineTh = xlThin
End Select
With Range("A" & RowCount)
With .Borders(BorderLoc)
.LineStyle = LineSz
.Weight = LineTh
End With
End With
End If
Next RowCount
Fini:
If BorderLocation = 3 Then
Range("A1:A" & lastrow + 1).Borders(xlInsideHorizontal) _
.LineStyle = xlLineStyleNone
End If
End Sub