LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 573
Default Protected spreadsheet, but need to add rows


Don Wiss wrote:
On 21 Apr 2006 14:25:18 -0700, davegb wrote:

I know that if I protect a spreadsheet, new rows can't be added. I'm
building a new spreadsheet for some of our less-knowledgeable users. I
only want them to be able to enter data, but this means they have to be
able to add rows for new/additional data. My plan is to create a macro
that prompts them to select the line above which they want to insert
new rows, tell it how many rows they want to add (1-10), then unprotect
the worksheet, add the new rows, adjust the sums to include the new
rows, if neccessary, then reprotect the spreadsheet.

I'm interested in feedback on:

Is this the best way to do this, or is there a better way to allow them
access but protect the cells with text and formulas?


I do that all the time. I have several universal macros to do this. One
calls an InputBox telling the user how many rows the range already has, and
asking for how many to add/delete. Then AddRowsCore takes the range name,
the number of rows to add, plus pairs of column letters. First pair is the
first and last column, then other pairs are column starts and stops for
moving up the user's data. You have to insert one row above the last to
keep the ranges intact. They could have data in the last row. So you move
it up. Other columns are copied down. Then the third macro deletes rows if
they enter a negative number. And a button from the Forms toolbar starts it
all.

Don <www.donwiss.com (e-mail link at home page bottom).


Thanks for the replies. After looking over the various possible
approaches, I decided it would probably be easier to just have the
macro create a new worksheet from scratch each time. This seemed easier
than adding/deleting rows when there are subtotals between the
different categories which would have to be adjusted each time. Seemed
like a lot of possibilities for problems with the macro. It will use
some of the ideas all of you submitted.

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Password protected spreadsheet BobW New Users to Excel 1 November 20th 09 02:25 PM
Subtotal with the protected spreadsheet Daniel Utsch Excel Discussion (Misc queries) 5 October 16th 09 03:39 PM
How to SUM in a protected spreadsheet ron Excel Worksheet Functions 3 March 25th 08 06:39 PM
Formatting in a Protected Spreadsheet Ang Excel Worksheet Functions 6 April 17th 07 12:28 AM
Can just the formatting alone in a spreadsheet be protected? Clorox Excel Discussion (Misc queries) 2 April 25th 06 05:00 PM


All times are GMT +1. The time now is 05:45 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"