View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
steveB steveB is offline
external usenet poster
 
Posts: 30
Default Protect/Unprotect Sheets

This will protect the Active sheet with a password:
ActiveSheet.Protect "mypassword"

This will unprotect the Active sheet with a password:
ActiveSheet.UnProtect "mypassword"

Remove "mypassword" and it will protect/unprotect without a password.

hth
--

steveB

(Remove 'NOSPAM' from email address if contacting me direct)


"Deeds" wrote in message
...
I am trying to write code to 1st unprotect a sheet, then refresh all

links, then re-protect the sheet. Everytime it seems to say I can't refresh
because the sheet is protected. How can I have it do the above in that
order so it unprotects, refreshes, and then protects again?
Thanks