Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Protect/Unprotect Sheets

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Protect/Unprotect Multiple Sheets With Full Options TEK Excel Discussion (Misc queries) 4 February 11th 09 02:56 PM
Protect, unprotect Pyrite Excel Discussion (Misc queries) 0 August 15th 08 03:18 PM
Protect/unprotect all sheets at once? wx4usa New Users to Excel 4 July 22nd 08 12:08 AM
Protect-Unprotect all the sheets Gary Excel Worksheet Functions 7 February 26th 07 08:13 PM
Macros for Protect/Unprotect all sheets in a workbook Paul Sheppard Excel Discussion (Misc queries) 2 August 4th 05 04:30 PM


All times are GMT +1. The time now is 12:17 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"