Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Protecting Worksheets

Is there any way to protect all the worksheets in a workbook without having
to go to each individual worksheet and using Tools Protection Protect
Worksheet?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default Protecting Worksheets

There should be an option in tools - protect to Protect the workbook as well
as to protect each individual sheet

"Pistols14" wrote:

Is there any way to protect all the worksheets in a workbook without having
to go to each individual worksheet and using Tools Protection Protect
Worksheet?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Protecting Worksheets

I have tried using this but it does not seem to do what I want to do. I have
password protected sheets in a workbook so that others cannot change certain
data or formulae within the worksheets. When I use the Protect Workbook
function it allows any user to change the data or formulae even though I
password protected the workbook. If I protect the individual sheets though it
does not allow any other user to change the data or formulae that I do not
want changed.

"Freddy" wrote:

There should be an option in tools - protect to Protect the workbook as well
as to protect each individual sheet

"Pistols14" wrote:

Is there any way to protect all the worksheets in a workbook without having
to go to each individual worksheet and using Tools Protection Protect
Worksheet?

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Protecting Worksheets

Nothing built into excel.

But you could create a macro:

Option Explicit
Sub ProtectThemAll
dim myPwd as string
dim wks as worksheet
myPwd = "hi there"

for each wks in activeworkbook.worksheets
wks.protect password:=mypwd
next wks
end sub
Sub UnProtectThemAll
dim myPwd as string
dim wks as worksheet
myPwd = "hi there"

for each wks in activeworkbook.worksheets
wks.unprotect password:=mypwd
next wks
end sub

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Pistols14 wrote:

Is there any way to protect all the worksheets in a workbook without having
to go to each individual worksheet and using Tools Protection Protect
Worksheet?


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 21
Default Protecting Worksheets

"Dave Peterson" wrote:

Nothing built into excel.
But you could create a macro:


I've done this to good effect.

But if you do this, make sure you name your macro something not very
obvious, in case the recipient simply runs your "unlock" macro to unlock the
sheets!

Also you should password protect your macro project to prevent people
discovering your password within the code.


  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 373
Default Protecting Worksheets

Just to add to what's already been said, you can input your own password
using a macro, like this. Of course, don't forget the password! James

Sub Prot()
Dim sht As Worksheet, pw As String
pw = InputBox("Password?", "Protect Worksheets")
For Each sht In ThisWorkbook.Worksheets
sht.Protect pw
Next sht
End Sub

Sub UnProt()
Dim sht As Worksheet, pw As String
pw = InputBox("Password?", "Unprotect Worksheets")
For Each sht In ThisWorkbook.Worksheets
sht.Unprotect pw
Next sht
End Sub


"baldmosher" wrote in message
...
"Dave Peterson" wrote:

Nothing built into excel.
But you could create a macro:


I've done this to good effect.

But if you do this, make sure you name your macro something not very
obvious, in case the recipient simply runs your "unlock" macro to unlock
the
sheets!

Also you should password protect your macro project to prevent people
discovering your password within the code.



  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Protecting Worksheets

On top of these recommendations, the OP should be aware that worksheet
protection isn't made to protect intellectual property. It's made to help
prevent the user from making typing errors--like overwriting cells with
important formulas.


baldmosher wrote:

"Dave Peterson" wrote:

Nothing built into excel.
But you could create a macro:


I've done this to good effect.

But if you do this, make sure you name your macro something not very
obvious, in case the recipient simply runs your "unlock" macro to unlock the
sheets!

Also you should password protect your macro project to prevent people
discovering your password within the code.


--

Dave Peterson
  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Protecting Worksheets

Thanks to everyone for that. It worked perfectly (and I now know a little bit
about macros also!).

"Dave Peterson" wrote:

On top of these recommendations, the OP should be aware that worksheet
protection isn't made to protect intellectual property. It's made to help
prevent the user from making typing errors--like overwriting cells with
important formulas.


baldmosher wrote:

"Dave Peterson" wrote:

Nothing built into excel.
But you could create a macro:


I've done this to good effect.

But if you do this, make sure you name your macro something not very
obvious, in case the recipient simply runs your "unlock" macro to unlock the
sheets!

Also you should password protect your macro project to prevent people
discovering your password within the code.


--

Dave Peterson

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
Protecting Worksheets Kaitlin.uk Excel Discussion (Misc queries) 1 January 18th 07 02:21 PM
protecting worksheets David Harrison Excel Discussion (Misc queries) 3 December 17th 06 09:28 PM
Protecting worksheets keiron James Excel Worksheet Functions 1 September 13th 06 04:23 PM
Protecting Worksheets Kathy081403 Excel Worksheet Functions 2 January 12th 06 12:56 AM
Protecting Worksheets saturnin02 Excel Discussion (Misc queries) 9 January 23rd 05 06:10 PM


All times are GMT +1. The time now is 07:01 AM.

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"