Option Explicit
Sub MakeSelectionBoarders()
' hiker95, 08/13/2011
' http://www.mrexcel.com/forum/showthread.php?t=571562
Dim rf As Long, rl As Long, cf As Long, cl As Long
Application.ScreenUpdating = False
rf = Selection.Row
rl = rf + Selection.Rows.Count - 1
cf = Selection.Column
cl = cf + Selection.Columns.Count - 1
'All Cells
With Range(Cells(rf, cf), Cells(rl, cl))
.Borders(xlEdgeLeft).Weight = xlMedium
.Borders(xlEdgeTop).Weight = xlMedium
.Borders(xlEdgeRight).Weight = xlMedium
.Borders(xlEdgeBottom).Weight = xlMedium
.Borders(xlInsideVertical).Weight = xlMedium
.Borders(xlInsideHorizontal).Weight = xlMedium
End With
'First Row
With Range(Cells(rf, cf), Cells(rf, cl))
.Borders(xlEdgeLeft).Weight = xlThick
.Borders(xlEdgeTop).Weight = xlThick
.Borders(xlEdgeRight).Weight = xlThick
.Borders(xlEdgeBottom).Weight = xlThick
.Borders(xlInsideVertical).Weight = xlThick
End With
'LastRow
With Range(Cells(rl, cf), Cells(rl, cl))
.Borders(xlEdgeLeft).Weight = xlThick
.Borders(xlEdgeTop).Weight = xlThick
.Borders(xlEdgeRight).Weight = xlThick
.Borders(xlEdgeBottom).Weight = xlThick
.Borders(xlInsideVertical).Weight = xlThick
End With
'Inside Cells
With Range(Cells(rf + 1, cf), Cells(rl - 1, cl))
'.Borders(xlEdgeLeft).Weight = xlThick
'.Borders(xlEdgeTop).Weight = xlThick
'.Borders(xlEdgeRight).Weight = xlThick
'.Borders(xlEdgeBottom).Weight = xlThick
.Borders(xlInsideVertical).Weight = xlThick
.Borders(xlInsideHorizontal).Weight = xlMedium
End With
'First Column
With Range(Cells(rf, cf), Cells(rl, cf))
.Borders(xlEdgeLeft).Weight = xlThick
End With
'Last Column
With Range(Cells(rf, cl), Cells(rl, cl))
.Borders(xlEdgeRight).Weight = xlThick
End With
Application.ScreenUpdating = True
End Sub