LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Password protect select sheets in a workbook

The macro below protects all worksheets in my workbook. I only want to
protect specific worksheets with the names Menu1, Menu2, etc. How would i
modify the macro to accomplish this. I know I can just select each worksheet
and protect it but I would like to learn the more advanced version below.
Sub ProtectSheets()
Dim mySheet As Worksheet
For Each mySheet In Worksheets
mySheet.Select
mySheet.protect "Password", True, True, True
Next mySheet
End Sub
 
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
Password Protect - put password in a cell in the workbook Mike R. Excel Programming 2 September 1st 06 06:29 AM
Lock and password protect only cells with formulas on all sheets in a workbook steve Excel Programming 6 July 9th 06 06:36 PM
password protect sheets rufusf Excel Worksheet Functions 2 March 7th 06 09:00 AM
View limited sheets in workbook based on logon/password protect Nicole Seibert Excel Programming 3 March 6th 06 09:43 PM


All times are GMT +1. The time now is 12:06 AM.

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

About Us

"It's about Microsoft Excel"