Code cancels protection properties

G

gavmer

Hi all,

Have a small prob. I run a code that unprotects then protects a shee
after running a copy/paste procedure. Prob is, after the code runs,
am no longer able to delete rows. Before the code ran i set th
protection to allow deletion of rows but running the code seems t
cancel this.

Is there a way round this??

Cheers all!
 
C

Charles

gavmer


After you run your code does it reset the password to protect th
sheet? If so you can not delete rows

Charle
 
G

gavmer

Hi charles,

Yes, it uses the password to unprotect and then uses the password t
protect the sheet once again. How can i get around this??

Cheers!
 
D

Don Lloyd

Hi,

When you re-protect the sheet are you using

ActiveSheet.Protect UserInterFaceOnly := True

regards,
Don
 
Top