Skip to content

Instantly share code, notes, and snippets.

@hedgejanuary
Created March 15, 2019 16:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hedgejanuary/9493e8f7e4c6b9bd40178cfd299a0436 to your computer and use it in GitHub Desktop.
Save hedgejanuary/9493e8f7e4c6b9bd40178cfd299a0436 to your computer and use it in GitHub Desktop.
Setting table borders.
Sub settingTblBorders()
ActiveSheet.Cells.Clear
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.TintAndShade = 0
.Weight = xlHairline
End With
Dim r As Long
r = Selection.Row - 1
With Rows(r).Font
.Bold = True
.Size = 8
End With
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment