A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Simple Worksheet Protection



 
 
Thread Tools Display Modes
  #1  
Old August 5th, 2008, 01:12 AM posted to microsoft.public.excel.worksheet.functions
James8309
external usenet poster
 
Posts: 30
Default Simple Worksheet Protection

Hi everyone,

I am just trying to lock the worksheet so no one can change anything
for all the worksheets.

I have 40 worksheets in a workbook and problem I am having is that I
do know how to lock worksheets by -tools-protection-protect sheet
but it just locks a single worksheet.

Q1. How do I lock all the other worksheet as well instead of clicking
each sheet and repeat what I just did?

Q2. Is it possible for me to set up some kind of 'track changes' and
find out where it is altered and actually who changed it?

Thank you so much for your help

Regards

James
  #2  
Old August 5th, 2008, 05:09 AM posted to microsoft.public.excel.worksheet.functions
Gord Dibben
external usenet poster
 
Posts: 20,252
Default Simple Worksheet Protection

Q1 answer.

Protect all sheets...............

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

Unprotect all sheets....................

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

Protect selected sheets..........................

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

Unprotect selected sheets................

Sub UnProtect_Selected_Sheets()
Application.ScreenUpdating = False
Set MySheets = ActiveWindow.SelectedSheets
For Each ws In MySheets
ws.Select
ws.UnProtect Password:="justme"
Next ws
Application.ScreenUpdating = True
End Sub

Q2.....questions

Is the workbook shared? You can track changes when it is.

Not shared? How and when would the workbook be accessed.

What changes would you want tracked.........all...........some?

It is easy enough to timestamp changes made and by whom but what constitutes
a change and would you want this recorded when someone saves the workbook?


Gord Dibben MS Excel MVP

On Mon, 4 Aug 2008 17:12:57 -0700 (PDT), James8309
wrote:

Hi everyone,

I am just trying to lock the worksheet so no one can change anything
for all the worksheets.

I have 40 worksheets in a workbook and problem I am having is that I
do know how to lock worksheets by -tools-protection-protect sheet
but it just locks a single worksheet.

Q1. How do I lock all the other worksheet as well instead of clicking
each sheet and repeat what I just did?

Q2. Is it possible for me to set up some kind of 'track changes' and
find out where it is altered and actually who changed it?

Thank you so much for your help

Regards

James


  #3  
Old August 7th, 2008, 12:14 AM posted to microsoft.public.excel.worksheet.functions
James8309
external usenet poster
 
Posts: 30
Default Simple Worksheet Protection

On Aug 5, 2:09*pm, Gord Dibben gorddibbATshawDOTca wrote:
Q1 answer.

Protect all sheets...............

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

Unprotect all sheets....................

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

Protect selected sheets..........................

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

Unprotect selected sheets................

Sub UnProtect_Selected_Sheets()
Application.ScreenUpdating = False
Set MySheets = ActiveWindow.SelectedSheets
For Each ws In MySheets
*ws.Select
* *ws.UnProtect Password:="justme"
Next ws
*Application.ScreenUpdating = True
End Sub

Q2.....questions

Is the workbook shared? *You can track changes when it is.

Not shared? *How and when would the workbook be accessed.

What changes would you want tracked.........all...........some?

It is easy enough to timestamp changes made and by whom but what constitutes
a change and would you want this recorded when someone saves the workbook?

Gord Dibben *MS Excel MVP

On Mon, 4 Aug 2008 17:12:57 -0700 (PDT), James8309
wrote:



Hi everyone,


I am just trying to lock the worksheet so no one can change anything
for all the worksheets.


I have 40 worksheets in a workbook and problem I am having is that I
do know how to lock worksheets by -tools-protection-protect sheet
but it just locks a single worksheet.


Q1. How do I lock all the other worksheet as well instead of clicking
each sheet and repeat what I just did?


Q2. Is it possible for me to set up some kind of 'track changes' and
find out where it is altered and actually who changed it?


Thank you so much for your help


Regards


James- Hide quoted text -


- Show quoted text -


Thank you for your help
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:49 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.