Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default password protect multiple worksheets with macro and exceptions

I have a 50+ sheet workbook that I need to password protect with a macro.
Unfortunately, I need to have exceptions for hyperlinks along with autosort
and autofilter among others. I have found answers for autofilter on this
site but no luck with the others. I am using the following code to protect:

Private Sub CommandButton1_Click()

Dim wSheet As Worksheet

For Each wSheet In Worksheets

If wSheet.ProtectContents = True Then

wSheet.UnProtect Password:=TextBox1.Text

Else

wSheet.Protect Password:=TextBox1.Text

End If

Next wSheet

Unload Me

End Sub


Any help would be greatly appreciated.

Thank you in Advance,

Dan
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 Multiple Worksheets from view before password Robb @ FLW Excel Discussion (Misc queries) 1 October 8th 09 11:36 PM
password protect multiple worksheets in excel [email protected] Excel Discussion (Misc queries) 3 August 8th 06 10:31 PM
Can I password protect worksheets? mocity Excel Worksheet Functions 2 May 23rd 06 01:07 AM
Password Protect Worksheets Tom Hewitt Excel Worksheet Functions 0 February 25th 05 12:57 PM
Macro to Open and Compile Multiple Worksheets that are password protected MissJen Excel Programming 1 January 3rd 04 03:42 AM


All times are GMT +1. The time now is 08:49 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"