Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 122
Default Protect/unprotect all sheets at once?

Is there a way to protect or unprotect all sheets at once without
going into each sheet?
  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 10,124
Default 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?


  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 122
Default 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.
  #4   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 4,393
Default 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.



  #5   Report Post  
Posted to microsoft.public.excel.newusers
Max Max is offline
external usenet poster
 
Posts: 9,221
Default 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
---




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 function sg Excel Worksheet Functions 3 December 6th 07 05:43 AM
Protect/ unprotect worksheet cc Excel Discussion (Misc queries) 0 October 19th 07 09:27 PM
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
Is there any way that you can protect or unprotect a group of wor. CheriT63 Excel Discussion (Misc queries) 9 January 8th 05 08:40 PM


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