Insert Rows in Protected Worksheet

K

Kim Via

I have a simple macro where the data is manipulated and
then the file is protected and saved as a new file. Then
looped to repeat multiple times. I want the user of the
new file to be able to insert rows. I see that Excel has
several check boxes in the protection function; however,
the ability to insert rows does not carry to the new
file. What is the code to allow this in the newly
created protected file?

Thank you for your help
 
R

Ron de Bruin

Hi Kim

For 2002-2003 you can use this

ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowInsertingColumns:=True, AllowInsertingRows:=True
 
G

Guest

ActiveSheet.Unprotect Password:="your password goes here"
'code goes here
ActiveSheet.Protect Password:="your password goes here"
 
Top