Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Allow user to insert rows on protected worksheet

I have 3 workbooks linked together and all have different parts protected. In
one workbook, I need to allow a user to insert rows and fill down the
calculations and formulas on specific worksheets and then re-protect the
worksheet. I tried using a macro with some success, but removed the password,
was limited to the number of rows recorded in the macro and although the
macro was in one workbook, when the others were open at the same time it work
in all of them. How could I make this work in one workbook only, keep the
password and allow the user to select the number of rows.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,533
Default Allow user to insert rows on protected worksheet

Hello
Create a macro which does what you want and call it from a button on the
desired sheet.

Sub Example()

NumOfRows = InputBox("Enter number of rows to insert . ", "Insert rows")

If NumOfRows 0 Then
Sheets("Sheet1").Unprotect Password:="JustMe"
TargetRow = ActiveCell.Row
Rows(TargetRow & ":" & TargetRow + NumOfRows - 1).Insert
End If
' copy formulas using PasteSpecial
Sheets("Sheet1").Protect Password:="JustMe"
End Sub

Hopes it helps,

Per

"sblock" skrev i meddelelsen
...
I have 3 workbooks linked together and all have different parts protected.
In
one workbook, I need to allow a user to insert rows and fill down the
calculations and formulas on specific worksheets and then re-protect the
worksheet. I tried using a macro with some success, but removed the
password,
was limited to the number of rows recorded in the macro and although the
macro was in one workbook, when the others were open at the same time it
work
in all of them. How could I make this work in one workbook only, keep the
password and allow the user to select the number of rows.


Reply
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
allow a user to edit ranges in a protected worksheet McA Excel Worksheet Functions 3 September 16th 08 08:38 AM
insert images in a protected worksheet kub Excel Worksheet Functions 10 July 28th 07 11:31 AM
Insert photo into a protected worksheet Paul Kouri Excel Worksheet Functions 4 April 12th 07 11:15 AM
Allow Insert of objects onto Protected Worksheet ShaneBell Excel Discussion (Misc queries) 1 June 29th 06 03:20 PM
Insert Photo into a protected worksheet gnolla Excel Worksheet Functions 1 February 5th 06 03:08 AM


All times are GMT +1. The time now is 06:42 PM.

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

About Us

"It's about Microsoft Excel"