ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Insert Rows in Protected Worksheet (https://www.excelbanter.com/excel-programming/304771-insert-rows-protected-worksheet.html)

Kim Via

Insert Rows in Protected Worksheet
 
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

Ron de Bruin

Insert Rows in Protected Worksheet
 
Hi Kim

For 2002-2003 you can use this

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

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Kim Via" wrote in message ...
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




No Name

Insert Rows in Protected Worksheet
 
ActiveSheet.Unprotect Password:="your password goes here"
'code goes here
ActiveSheet.Protect Password:="your password goes here"


All times are GMT +1. The time now is 09:38 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com