![]() |
Protect/unprotect all sheets at once?
Is there a way to protect or unprotect all sheets at once without
going into each sheet? |
Protect/unprotect all sheets at once?
for each sh in sheets
sh.unprotect next sh -- Don Guillett Microsoft MVP Excel SalesAid Software "wx4usa" wrote in message ... Is there a way to protect or unprotect all sheets at once without going into each sheet? |
Protect/unprotect all sheets at once?
On Jul 21, 10:31 am, "Don Guillett" wrote:
for each sh in sheets sh.unprotect next sh -- Don Guillett Microsoft MVP Excel SalesAid Software "wx4usa" wrote in message ... Is there a way to protect or unprotect all sheets at once without going into each sheet? I am afraid I dont follow you. |
Protect/unprotect all sheets at once?
Don has given you some VBA code to do the task
Look here for more info David McRitchie's site on "getting started" with VBA http://www.mvps.org/dmcritchie/excel/getstarted.htm -- Bernard V Liengme Microsoft Excel MVP http://people.stfx.ca/bliengme remove caps from email "wx4usa" wrote in message ... On Jul 21, 10:31 am, "Don Guillett" wrote: for each sh in sheets sh.unprotect next sh -- Don Guillett Microsoft MVP Excel SalesAid Software "wx4usa" wrote in message ... Is there a way to protect or unprotect all sheets at once without going into each sheet? I am afraid I dont follow you. |
Protect/unprotect all sheets at once?
Is there a way to protect or unprotect all sheets at once
without going into each sheet? Some thoughts to get you going there .. (subs taken from a posting by Norman Harker) 1. Copy everything within the dotted lines below 2. Press Alt+F11 to go to VBE 3. Click Insert Module 4. Right-click in the code window (whitespace) on the right Paste 5. Press Alt+Q to get back to Excel To run the subs, press Alt+F8 to bring up the Macro dialog Double click directly on the sub* (or select the sub in the dialog, click Run) *ProtectAllSheets (or UnprotectAllSheets) '---- Sub ProtectAllSheets() Dim n As Integer For n = 1 To Worksheets.Count Worksheets(n).Protect Password:="not4u2see" Next n End Sub Sub UnprotectAllSheets() Dim n As Integer For n = 1 To Worksheets.Count Worksheets(n).Unprotect Password:="not4u2see" Next n End Sub '--- -- Max Singapore http://savefile.com/projects/236895 Downloads:16,000 Files:354 Subscribers:53 xdemechanik --- |
All times are GMT +1. The time now is 11:13 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com