In Object Browser, search for "xlBordersIndex" for all border index values
Try to record a macro you will learn from that.
However, this is the shortest modified code that will do the task:
Code:
Dim b As Integer
With Sheet1.Range("C3:C5")
For b = xlDiagonalDown To xlInsideHorizontal '-- 5 To 12
Select Case b
'Case xlEdgeLeft, xlEdgeTop, xlEdgeBottom, xlEdgeRight '-- 7, 8, 9, 10
Case xlEdgeLeft To xlEdgeRight '-- 7 to 10
.Borders(b).LineStyle = xlContinuous
.Borders(b).Weight = xlThin
Case Else
.Borders(b).LineStyle = xlNone
End Select
Next
End With