Hello,
I am trying to add a button that will edit the row under the last row with values. I am having difficulty with adding a border around Cell (SubNewRow,2).
Also, if i wanted to span this border on SubNewrow from column B to M how would I write that?
Thanks.
I am trying to add a button that will edit the row under the last row with values. I am having difficulty with adding a border around Cell (SubNewRow,2).
Also, if i wanted to span this border on SubNewrow from column B to M how would I write that?
Thanks.
VBA Code:
Private Sub CommandButton2_Click() 'If YES
SubNewRow = Sheet5.Cells(1000, 2).End(xlUp).Row + 1 'Finds the last edited row and then adds 1 row
Sheet5.Rows(SubNewRow).RowHeight = 18.6
Sheet5.Range("B" & SubNewRow).Resize(, 8).MergeCells = True
Sheet5.Range("M" & SubNewRow).Resize(, 3).MergeCells = True
Sheet5.Cells(SubNewRow, 2).Value = "If YES:"
Sheet5.Cells(SubNewRow, 2).Font.Bold = True
'''Border
Sheet5.Range(SubNewRow, 2).BorderAround.Weight = xlThin
End Sub