Hi
I hope someone can help me with vba code for borders in my sheet.
I have a Commandbutton which creates a new line, where it changes the the borders to xlThin. This is fine for the bottom line, but I would like to have top and both sides thicker like the ones above. I just don´t know how to do this.
I know the code I have made could probably also be made alot simpler.
Let me know if it doesnt make sense.
I hope someone can help me with vba code for borders in my sheet.
I have a Commandbutton which creates a new line, where it changes the the borders to xlThin. This is fine for the bottom line, but I would like to have top and both sides thicker like the ones above. I just don´t know how to do this.
I know the code I have made could probably also be made alot simpler.
Let me know if it doesnt make sense.
VBA Code:
Private Sub CommandButton1_Click()
Dim iRow As Long
ActiveSheet.Range("A7").Select
ActiveCell.EntireRow.Insert shift:=xlDown
ActiveSheet.Range("A7").Select
ActiveCell.EntireRow.RowHeight = 15
ActiveSheet.Range("B7:U7").Select
Selection.Interior.ColorIndex = 0
ActiveSheet.Range("B7:U7").Select
Selection.Borders.Weight = xlThin
ActiveSheet.Range("B7:U7").Select
Selection.Font.Size = 11
ActiveSheet.Range("K7").Select
Selection.Interior.ColorIndex = 48
ActiveSheet.Range("L7").Select
Selection.Interior.ColorIndex = 44
ActiveSheet.Range("B7:U8").Select
Selection.Font.Bold = False
End Sub