macro to unlock worksheet

  • Thread starter Thread starter Kirsty
  • Start date Start date
K

Kirsty

I want my macro to unlock the worksheet before it runs, and then lock it
again after.

At the moment I have Sheets("Daily Report").Select
wsheet.Unprotect Password:="computer"

however this is getting an error.

Any suggestions?
 
Kirsty,

Do it like this

Sheets("Daily Report").Unprotect Password:="computer"
'do things
Sheets("Daily Report").Protect Password:="computer"

Mike
 
thanks, works perfectly

Mike H said:
Kirsty,

Do it like this

Sheets("Daily Report").Unprotect Password:="computer"
'do things
Sheets("Daily Report").Protect Password:="computer"

Mike
 

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