View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
PeteD PeteD is offline
external usenet poster
 
Posts: 3
Default Protecting Sheets

Thanks Tim.

Pete



-----Original Message-----
Yes you can. Here is sample code. This uses the active
sheet but you can do a select of any sheet also.

Sub ProtectWorksheet()
ActiveSheet.Protect password:="password"
End Sub

Sub UnprotectWorksheet()
ActiveSheet.Unprotect password:="password"
End Sub

-----Original Message-----
Hi,

Is it possible to protect/unprotect a sheet with a
password in VBA?. Example please if any.

Thanks
PeteD
.



.