A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Button on Form to Add more rows



 
 
Thread Tools Display Modes
  #1  
Old May 24th, 2010, 03:51 PM posted to microsoft.public.excel.worksheet.functions
Sam
external usenet poster
 
Posts: 855
Default Button on Form to Add more rows

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 M.
Project Controls Data Coordinator
  #2  
Old May 24th, 2010, 10:05 PM posted to microsoft.public.excel.worksheet.functions
Otto Moehrbach[_2_]
external usenet poster
 
Posts: 716
Default Button on Form to Add more rows

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

"SaM" wrote in message
...
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 M.
Project Controls Data Coordinator


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:35 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.