View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Steven Revell Steven Revell is offline
external usenet poster
 
Posts: 35
Default Protecting/Unprotecting Workbook

Sub LockIT()
If activeworkbook.protectcontents = False then activeworkbook.protect "mypass"
end Sub

Sub UnlockIT()
if activeworkbook.protectcontents = true then activeworkbook.unprotect "mypass"
End Sub