Excel VBA-Protect and unprotect sheet with BVA

  • Thread starter Thread starter marfrk
  • Start date Start date
M

marfrk

I can`t run a macro because the cells are blocked and the shee
protected. How do I unprotect and protect a sheet with BVA code tha
include a prestablished pasword.
Thanks in advance
 
Sheets("Sheet1").UnProtect("YourPwd")
Sheets("Sheet1").Protect("YourPwd")
HTH
Regards
Pascal
 

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