Insert Rows in Protected Worksheet

  • Thread starter Thread starter Kim Via
  • Start date Start date
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
 
Hi Kim

For 2002-2003 you can use this

ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowInsertingColumns:=True, AllowInsertingRows:=True
 
ActiveSheet.Unprotect Password:="your password goes here"
'code goes here
ActiveSheet.Protect Password:="your password goes here"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top