PC Review


Reply
Thread Tools Rate Thread

Add rows via a button on a protected sheet

 
 
DesertRatFloatingInTheOcean
Guest
Posts: n/a
 
      6th Oct 2008
I need some help with two things.

1. I know this is probably a very basic question but any help anyone can
give me would be greatly appreciated. I have a work book that I made for
keeping up with rental costs. I need to be able to have the workbook locked
from formating and deleting formulas. I want to place a button at the top of
all the sheets that will add five rows at a time to the last row. Here's the
other part when it adds the rows they need to have the same formatting and
the updated formulas in them.

Everytime I have tried a macro it doesnt work.

2. This workbook also has a tally sheet with all the names of our vendors
and their running totals for each and a grand total for all. I need another
button to add a new sheet that is a blank of the rental sheet. And at the
same time update the tally sheet with the new sheets name and total amount
and update the the formula I have to add the grand total.

I hope that makes sense and someone can help.

Thanks


 
Reply With Quote
 
 
 
 
Per Jessen
Guest
Posts: n/a
 
      6th Oct 2008
Hi

1. Unprotect the sheet, do your stuff and re-protect it.

me.unprotect Password:="JustMe"
'your code
me.protect Password:= "JustMe"

2. I would create a template sheet within the workbook, set up with formulas
and other standard information. Once the template sheet is as desired make
it invisible.
Then insert a new sheet and copy the template to new sheet.
Finally add the new vendor to the tally sheet and adjust formulas.

Hopefully this example will get you started:

Sheets("Template").Visible = False ' Only needed to hide the sheet
"Template"
Set newSh = Sheets.Add(after:=Sheets(Sheets.Count))
NewVendor = InputBox("Enter name of new vendor :")
If NewVendor = "" Then GoTo Finito
newSh.Name = NewVendor
Sheets("Template").Range("A1.H100").Copy Destination:=newSh.Range("A1")
' Insert vendor in tally sheet and adjust formulas

Finito:
Set newSh = Nothing

Regards,
Per

"DesertRatFloatingInTheOcean"
<(E-Mail Removed)> skrev i meddelelsen
news:B8453663-E1FE-4835-8F7E-(E-Mail Removed)...
>I need some help with two things.
>
> 1. I know this is probably a very basic question but any help anyone can
> give me would be greatly appreciated. I have a work book that I made for
> keeping up with rental costs. I need to be able to have the workbook
> locked
> from formating and deleting formulas. I want to place a button at the top
> of
> all the sheets that will add five rows at a time to the last row. Here's
> the
> other part when it adds the rows they need to have the same formatting and
> the updated formulas in them.
>
> Everytime I have tried a macro it doesnt work.
>
> 2. This workbook also has a tally sheet with all the names of our vendors
> and their running totals for each and a grand total for all. I need
> another
> button to add a new sheet that is a blank of the rental sheet. And at the
> same time update the tally sheet with the new sheets name and total amount
> and update the the formula I have to add the grand total.
>
> I hope that makes sense and someone can help.
>
> Thanks
>
>


 
Reply With Quote
 
DesertRatFloatingInTheOcean
Guest
Posts: n/a
 
      7th Oct 2008
Thanks but I dont think I explained it enough;

I know how to add rows and not mess up the spreadsheet. MY COWORKERS DO NOT.
I am trying to make this bullet proof so that when I come off vacation the
spreadsheet is still usable and not trashed.

I need the sheet locked and button at the top of the sheet that will add 5
rows and the formulas at the bottom of the sheet.

the 2nd solutions seems like it will work great.

Thank you very much any more help you might have would be very helpful

"Per Jessen" wrote:

> Hi
>
> 1. Unprotect the sheet, do your stuff and re-protect it.
>
> me.unprotect Password:="JustMe"
> 'your code
> me.protect Password:= "JustMe"
>
> 2. I would create a template sheet within the workbook, set up with formulas
> and other standard information. Once the template sheet is as desired make
> it invisible.
> Then insert a new sheet and copy the template to new sheet.
> Finally add the new vendor to the tally sheet and adjust formulas.
>
> Hopefully this example will get you started:
>
> Sheets("Template").Visible = False ' Only needed to hide the sheet
> "Template"
> Set newSh = Sheets.Add(after:=Sheets(Sheets.Count))
> NewVendor = InputBox("Enter name of new vendor :")
> If NewVendor = "" Then GoTo Finito
> newSh.Name = NewVendor
> Sheets("Template").Range("A1.H100").Copy Destination:=newSh.Range("A1")
> ' Insert vendor in tally sheet and adjust formulas
>
> Finito:
> Set newSh = Nothing
>
> Regards,
> Per
>
> "DesertRatFloatingInTheOcean"
> <(E-Mail Removed)> skrev i meddelelsen
> news:B8453663-E1FE-4835-8F7E-(E-Mail Removed)...
> >I need some help with two things.
> >
> > 1. I know this is probably a very basic question but any help anyone can
> > give me would be greatly appreciated. I have a work book that I made for
> > keeping up with rental costs. I need to be able to have the workbook
> > locked
> > from formating and deleting formulas. I want to place a button at the top
> > of
> > all the sheets that will add five rows at a time to the last row. Here's
> > the
> > other part when it adds the rows they need to have the same formatting and
> > the updated formulas in them.
> >
> > Everytime I have tried a macro it doesnt work.
> >
> > 2. This workbook also has a tally sheet with all the names of our vendors
> > and their running totals for each and a grand total for all. I need
> > another
> > button to add a new sheet that is a blank of the rental sheet. And at the
> > same time update the tally sheet with the new sheets name and total amount
> > and update the the formula I have to add the grand total.
> >
> > I hope that makes sense and someone can help.
> >
> > Thanks
> >
> >

>
>

 
Reply With Quote
 
Per Jessen
Guest
Posts: n/a
 
      7th Oct 2008
Hi

To help you further I need more information about how your sheets are
designed.

Is there rows in the bottom obove which new rows are to be inserted, and can
formulas be copied from the row above. Or can new rows be inserted in first
empty row?

In which cells / columns is data entry allowed ?

Regards,
Per

"DesertRatFloatingInTheOcean"
<(E-Mail Removed)> skrev i meddelelsen
news:2B930B78-A191-4C2E-9EFF-(E-Mail Removed)...
> Thanks but I dont think I explained it enough;
>
> I know how to add rows and not mess up the spreadsheet. MY COWORKERS DO
> NOT.
> I am trying to make this bullet proof so that when I come off vacation the
> spreadsheet is still usable and not trashed.
>
> I need the sheet locked and button at the top of the sheet that will add 5
> rows and the formulas at the bottom of the sheet.
>
> the 2nd solutions seems like it will work great.
>
> Thank you very much any more help you might have would be very helpful
>
> "Per Jessen" wrote:
>
>> Hi
>>
>> 1. Unprotect the sheet, do your stuff and re-protect it.
>>
>> me.unprotect Password:="JustMe"
>> 'your code
>> me.protect Password:= "JustMe"
>>
>> 2. I would create a template sheet within the workbook, set up with
>> formulas
>> and other standard information. Once the template sheet is as desired
>> make
>> it invisible.
>> Then insert a new sheet and copy the template to new sheet.
>> Finally add the new vendor to the tally sheet and adjust formulas.
>>
>> Hopefully this example will get you started:
>>
>> Sheets("Template").Visible = False ' Only needed to hide the sheet
>> "Template"
>> Set newSh = Sheets.Add(after:=Sheets(Sheets.Count))
>> NewVendor = InputBox("Enter name of new vendor :")
>> If NewVendor = "" Then GoTo Finito
>> newSh.Name = NewVendor
>> Sheets("Template").Range("A1.H100").Copy Destination:=newSh.Range("A1")
>> ' Insert vendor in tally sheet and adjust formulas
>>
>> Finito:
>> Set newSh = Nothing
>>
>> Regards,
>> Per
>>
>> "DesertRatFloatingInTheOcean"
>> <(E-Mail Removed)> skrev i
>> meddelelsen
>> news:B8453663-E1FE-4835-8F7E-(E-Mail Removed)...
>> >I need some help with two things.
>> >
>> > 1. I know this is probably a very basic question but any help anyone
>> > can
>> > give me would be greatly appreciated. I have a work book that I made
>> > for
>> > keeping up with rental costs. I need to be able to have the workbook
>> > locked
>> > from formating and deleting formulas. I want to place a button at the
>> > top
>> > of
>> > all the sheets that will add five rows at a time to the last row.
>> > Here's
>> > the
>> > other part when it adds the rows they need to have the same formatting
>> > and
>> > the updated formulas in them.
>> >
>> > Everytime I have tried a macro it doesnt work.
>> >
>> > 2. This workbook also has a tally sheet with all the names of our
>> > vendors
>> > and their running totals for each and a grand total for all. I need
>> > another
>> > button to add a new sheet that is a blank of the rental sheet. And at
>> > the
>> > same time update the tally sheet with the new sheets name and total
>> > amount
>> > and update the the formula I have to add the grand total.
>> >
>> > I hope that makes sense and someone can help.
>> >
>> > Thanks
>> >
>> >

>>
>>


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
insert rows--->protected sheet Art Microsoft Excel Worksheet Functions 1 19th Mar 2010 02:25 AM
Delete rows while sheet protected loulou Microsoft Excel Misc 3 7th Aug 2008 09:38 PM
Hiding rows while sheet is protected burnsbyrne Microsoft Excel Misc 5 22nd Aug 2006 08:40 PM
how to hide rows in a protected sheet =?Utf-8?B?UHJha2FzaA==?= Microsoft Excel Worksheet Functions 7 18th Jan 2005 02:42 PM
Resize rows in a protected sheet Andrew Harder Microsoft Excel Misc 2 27th Jan 2004 01:12 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:36 AM.