Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Excel Worksheet protection

Bill

Sub ProtectAllSheets()
Application.ScreenUpdating = False
Dim n As Single
For n = 1 To Sheets.Count
Sheets(n).Protect Password:="justme"
Next n
Application.ScreenUpdating = True
End Sub

Sub UnprotectAllSheets()
Application.ScreenUpdating = False
Dim n As Single
For n = 1 To Sheets.Count
Sheets(n).Unprotect Password:="justme"
Next n
Application.ScreenUpdating = True
End Sub

Sub Protect_Selected_Sheets()
Set MySheets = ActiveWindow.SelectedSheets
For Each ws In MySheets
ws.Select
ws.Protect Password:="justme"
Next ws
End Sub


Gord Dibben MS Excel MVP

On Sat, 5 Jan 2008 09:29:00 -0800, BillFitz
wrote:

I tried that, including the input of a Password, but found that the Password
was not correctly applied, with the result that the Unprotect worked without
using a Password

"CmK" wrote:

I think the best way is to write a macro


"BillFitz" wrote:

Is there a simple way to Protect/Unprotect individual worksheets in a file
without having to visit each worksheet.
I use a file containing 31 worksheets for each day of month and I can make
changes each month, to update for new product lines on each sheet, across all
worksheets using the Group function. However, in order to Unprotect and then
Protect each worksheet individually is a time consuming process.


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
use a macro to automate excel worksheet password protection Bodyshopman Excel Discussion (Misc queries) 2 July 25th 07 01:21 AM
Cell Protection vs. Worksheet Protection kmwhitt Excel Discussion (Misc queries) 4 September 24th 06 02:37 AM
Worksheet protection is gone and only wokbook protection can be se Eric C. Excel Discussion (Misc queries) 4 May 2nd 06 04:50 PM
Worksheet Protection Angeline Excel Discussion (Misc queries) 3 March 20th 06 12:49 PM
worksheet protection yemi Excel Discussion (Misc queries) 3 May 20th 05 10:12 PM


All times are GMT +1. The time now is 01:24 PM.

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"