excel - macro code to open a protected sheet, enter passowrd, and then protect sheet

  • Thread starter Thread starter arunjoshi
  • Start date Start date
A

arunjoshi

i want to open a protected sheet - where protection has been done usin
a passowrd. and then later protect the sheet again using a password
 
Hi
use something like
activesheet.unprotect password:="yourpassword"
'some code
activesheet.protect password:="yourpassword"
 

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