View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default macro to unlock worksheet

Kirsty,

Do it like this

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

Mike

"Kirsty" wrote:

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?