Macro Passwords

B

bmorgan8h

I have not been able to get my password protected spreadsheets to reapply the
password when I use a macro to unprotect the spreadsheet, perform a function,
and then attempt to reapply the password. I can reprotect the spreadsheet,
but it is without a password.

Can any help me understand what I am doing wrong. I really want to reapply
the password.
 
M

Mike H

Try this

ActiveSheet.Unprotect Password:="Mypass"
'do lots of things
ActiveSheet.Protect Password:="Mypass"


Mike
 
L

Lars-Åke Aspelin

I have not been able to get my password protected spreadsheets to reapply the
password when I use a macro to unprotect the spreadsheet, perform a function,
and then attempt to reapply the password. I can reprotect the spreadsheet,
but it is without a password.

Can any help me understand what I am doing wrong. I really want to reapply
the password.

You have written something wrong in your code.

It is easier to help if you post the few code lines of your macro
where you try to protect the spreadsheet and it fails.

Lars-Åke
 
Top