Button on Form to Add more rows

  • Thread starter Thread starter SaM
  • Start date Start date
S

SaM

I have a form that I have created in excel and in one section of that form, I
want to be able to add a button that will add 5 more rows for that specific
section. The form is protected as there is some pretty heavy formulas and
direct links to databases that update info for the form, so of course users
cannot add rows themselves - is there a way to add a button that will allow
users to add more rows to the form?
 
Susan
Paste this macro into a standard module, then create the button you want
and assign this macro to that button. This macro will unprotect the sheet,
insert the new blank rows, and protect the sheet. Change the row numbers to
fit with your form. Post back if you need more. HTH Otto
Sub InsertRows()
ActiveSheet.Unprotect Password:="Susan"
Rows("12:14").Insert Shift:=xlDown
ActiveSheet.Protect Password:="Susan"
End Sub
 
Back
Top