Hello.
I've inserted an ActiveX Controls Command Button so that I can insert a new row to my worksheet when I click on the Button. However, it does not insert a new row below as I would like it to; it inserts a new row above. Every time I have to insert a new row I want it to always end up being the very last row on my sheet. Is there a simple code that will solve the problem? Below is the coding I have so far:
Private Sub CommandButton1_Click()
Sheets("Spend").Range("D37").Select
ActiveCell.EntireRow.Insert Shift = xlDown
Sheets("Spend").Range("D37").Select
Selection.Borders(xlEdgeBottom).Weight = xlThin
Sheets("Spend").Range("D37").Select
ActiveCell.Formula = "=LEFT(D37,3)&(VALUE(MID(D37,4,4))+1)&RIGHT(D37,1)"
Sheets("Spend").Range("E37").Select
Selection.Borders.LineStyle = xlNone
Sheets("Spend").Range("F37").Select
Selection.Borders(xlEdgeBottom).Weight = xlThin
Sheets("Spend").Range("G37").Select
Selection.Borders.LineStyle = xlNone
Sheets("Spend").Range("H37").Select
Selection.Borders(xlEdgeBottom).Weight = xlThin
Sheets("Spend").Range("I37").Select
Selection.Borders.LineStyle = xlNone
Sheets("Spend").Range("J37").Select
Selection.Borders(xlEdgeBottom).Weight = xlThin
Sheets("Spend").Range("K37").Select
Selection.Borders.LineStyle = xlNone
Sheets("Spend").Range("L37").Select
Selection.Borders(xlEdgeBottom).Weight = xlThin
Sheets("Spend").Range("M37").Select
Selection.Borders.LineStyle = xlNone
Sheets("Spend").Range("N37").Select
Selection.Borders(xlEdgeBottom).Weight = xlThin
Sheets("Spend").Range("O37").Select
Selection.Borders(xlEdgeBottom).Weight = xlThin
Sheets("Spend").Range("P37").Select
Selection.Borders(xlEdgeBottom).Weight = xlThin
Sheets("Spend").Range("Q37").Select
Selection.Borders(xlEdgeBottom).Weight = xlThin
Sheets("Spend").Range("R37").Select
Selection.Borders(xlEdgeBottom).Weight = xlThin
Sheets("Spend").Range("S37").Select
Selection.Borders(xlEdgeBottom).Weight = xlThin
Sheets("Spend").Range("T37").Select
Selection.Borders(xlEdgeBottom).Weight = xlThin
Sheets("Spend").Range("U37").Select
Selection.Borders(xlEdgeBottom).Weight = xlThin
Sheets("Spend").Range("V37").Select
Selection.Borders(xlEdgeBottom).Weight = xlThin
Sheets("Spend").Range("W37").Select
Selection.Borders.LineStyle = xlNone
Sheets("Spend").Range("X37").Select
Selection.Borders(xlEdgeBottom).Weight = xlThin
End Sub
Thank you in advance for your help!