Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Adam
 
Posts: n/a
Default Protect Sheet > All sheets

Hi

I'm using Excel 97 and get a bit annoyed having to Protect each worksheet
individually.

Is there a way where I can password protect all sheets in a workbook?

Please advise
--
Adam
-----------
Windows 98 + Office Pro 97
  #2   Report Post  
JulieD
 
Posts: n/a
Default

Hi Adam

only by using code such as:

Sub ProtectAll()
For each ws in sheets
ws.protect("pwd")
Next
End Sub

'and to unprotect

Sub UnprotectAll()
For each ws in sheets
ws.unprotect("pwd")
Next
End Sub
----
Please post back if you'ld like assistance using this code. Note - you'll
need to change pwd to your actual password.

Cheers
JulieD


"Adam" wrote in message
...
Hi

I'm using Excel 97 and get a bit annoyed having to Protect each worksheet
individually.

Is there a way where I can password protect all sheets in a workbook?

Please advise
--
Adam
-----------
Windows 98 + Office Pro 97



  #3   Report Post  
tjtjjtjt
 
Posts: n/a
Default

You have to use VBA for this. This example willl assign the same password to
each sheet.
I'm running 2003, and this works for me.

If you are unfamiliar with macors, see:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Sub ProtectAllSheets()
Dim sht As Worksheet
For Each sht In ThisWorkbook.Worksheets
sht.Protect "password"
Next sht
End Sub

tj


"Adam" wrote:

Hi

I'm using Excel 97 and get a bit annoyed having to Protect each worksheet
individually.

Is there a way where I can password protect all sheets in a workbook?

Please advise
--
Adam
-----------
Windows 98 + Office Pro 97

  #4   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

Only through a macro, put these 2 macros in a module (Alt + F11, insertmodule)

Sub ProtectMe()
Dim sh As Worksheet
Application.ScreenUpdating = False
For Each sh In ThisWorkbook.Worksheets
sh.Protect "xxxxx"
Next sh
Application.ScreenUpdating = True
End Sub

Sub UnProtectMe()
Dim sh As Worksheet
Application.ScreenUpdating = False
For Each sh In ThisWorkbook.Worksheets
sh.Unprotect "xxxxx"
Next sh
Application.ScreenUpdating = True
End Sub


replace "xxxxx" with whatever password you want to use
press Alt + q to close the VBE and save the workbook.
To run the macros press Alt + F8

Regards,

Peo Sjoblom

"Adam" wrote:

Hi

I'm using Excel 97 and get a bit annoyed having to Protect each worksheet
individually.

Is there a way where I can password protect all sheets in a workbook?

Please advise
--
Adam
-----------
Windows 98 + Office Pro 97

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
Variable validation-password protect sheet Marty Excel Worksheet Functions 0 January 26th 05 02:27 PM
Printing separate sheets on one paper sheet Attyla Excel Discussion (Misc queries) 2 December 19th 04 05:58 PM
Linking sheets to a summary sheet in workbook gambinijr Excel Discussion (Misc queries) 4 December 16th 04 08:13 PM
linking multiple sheets to a summary sheet greg g Excel Discussion (Misc queries) 1 December 16th 04 07:43 AM
Naming & renaming a sheet tab Cgbilliar Excel Worksheet Functions 1 November 7th 04 05:57 PM


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