View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Adriaan vd Linde Adriaan vd Linde is offline
external usenet poster
 
Posts: 2
Default password problem with protect worksheet

This is a copy of coding that is running in an apps of
mine.

Remember to protect each sheet by running a VBA prog

Sub MyProtect()
ActiveWorkbook.Protect Password:="ZAC"
ActiveSheet.Protect Password:="ZAC"
End Sub

Sub MyUnprotect()
ActiveWorkbook.Unprotect Password:="ZAC"
ActiveSheet.Unprotect Password:="ZAC"
End Sub



-----Original Message-----
i tried to protect worksheet with password, then

unprotect again, but it
doesn't work, it shows password error.
i simply used like

activeworksheet.protect password := "abc"

then
activesheet.unprotect password:="abc"

anybody can advice where i m wrong?


.