Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Protect cells from other users w/out me having to enter pw

I have an excel file on a network drive, other people view it. I changed the
protection so that they can only select and autofilter, but cannot edit
cells. However, I have to unprotect it for myself all the time and then I
save it forgetting to protect it again. There has to be an easier way so
that other people can't edit and I don't have to keep putting in password.
Right?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,101
Default Protect cells from other users w/out me having to enter pw

Right click on sheet1 Select View code
You will see ThisWorkbook double click then paste this
This will protect the workbook every time you close and you
can change "Password" to what you want password to be
Test on new workbook
Private Sub Workbook_BeforeClose(Cancel As Boolean)
'Replace "Password" with your password
'this will set password when closing workbook
ActiveSheet.Protect "Password", True
ActiveWorkbook.Protect "Password", True

End Sub

"Tara at Walsh" wrote:

I have an excel file on a network drive, other people view it. I changed the
protection so that they can only select and autofilter, but cannot edit
cells. However, I have to unprotect it for myself all the time and then I
save it forgetting to protect it again. There has to be an easier way so
that other people can't edit and I don't have to keep putting in password.
Right?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Protect cells from other users w/out me having to enter pw

Ummmm, I'm having a little trouble making this work. I copied the lines
exactly as they appear below into my code on the test sheet and it doesn't
seem to be working:

Private Sub Workbook_BeforeClose(Cancel As Boolean)
ActiveSheet.Protect "whoknows", True
ActiveWorkbook.Protect "whoknows", True

"Mike" wrote:

Right click on sheet1 Select View code
You will see ThisWorkbook double click then paste this
This will protect the workbook every time you close and you
can change "Password" to what you want password to be
Test on new workbook
Private Sub Workbook_BeforeClose(Cancel As Boolean)
'Replace "Password" with your password
'this will set password when closing workbook
ActiveSheet.Protect "Password", True
ActiveWorkbook.Protect "Password", True

End Sub

"Tara at Walsh" wrote:

I have an excel file on a network drive, other people view it. I changed the
protection so that they can only select and autofilter, but cannot edit
cells. However, I have to unprotect it for myself all the time and then I
save it forgetting to protect it again. There has to be an easier way so
that other people can't edit and I don't have to keep putting in password.
Right?

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 108
Default Protect cells from other users w/out me having to enter pw

Another way is to:

Select the range you would like to be protected.
On the Tools menu point to protection Allow users to edit ranges.
Click on 'New' make sure the right range is selected.
Next to 'Specify who may edit range without password' click the 'Permission'
button, then select or add your name.
Click on protect sheet (you can set a password if you wish).
Click OK.
No one will have permission to edit your sheet, but you can edit it any time
without having to enter a password.
h.t.h.

--
If u change the way u look @ things, the things u look at change.


"Mike" wrote:

Right click on sheet1 Select View code
You will see ThisWorkbook double click then paste this
This will protect the workbook every time you close and you
can change "Password" to what you want password to be
Test on new workbook
Private Sub Workbook_BeforeClose(Cancel As Boolean)
'Replace "Password" with your password
'this will set password when closing workbook
ActiveSheet.Protect "Password", True
ActiveWorkbook.Protect "Password", True

End Sub

"Tara at Walsh" wrote:

I have an excel file on a network drive, other people view it. I changed the
protection so that they can only select and autofilter, but cannot edit
cells. However, I have to unprotect it for myself all the time and then I
save it forgetting to protect it again. There has to be an easier way so
that other people can't edit and I don't have to keep putting in password.
Right?

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,101
Default Protect cells from other users w/out me having to enter pw

Be sure toput the code into ThisWorkbook Module and Not sheet Module
Sould work

Private Sub Workbook_BeforeClose(Cancel As Boolean)
ActiveSheet.Protect "whoknows", True
ActiveWorkbook.Protect "whoknows", True
End Sub

"Tara at Walsh" wrote:

Ummmm, I'm having a little trouble making this work. I copied the lines
exactly as they appear below into my code on the test sheet and it doesn't
seem to be working:

Private Sub Workbook_BeforeClose(Cancel As Boolean)
ActiveSheet.Protect "whoknows", True
ActiveWorkbook.Protect "whoknows", True

"Mike" wrote:

Right click on sheet1 Select View code
You will see ThisWorkbook double click then paste this
This will protect the workbook every time you close and you
can change "Password" to what you want password to be
Test on new workbook
Private Sub Workbook_BeforeClose(Cancel As Boolean)
'Replace "Password" with your password
'this will set password when closing workbook
ActiveSheet.Protect "Password", True
ActiveWorkbook.Protect "Password", True

End Sub

"Tara at Walsh" wrote:

I have an excel file on a network drive, other people view it. I changed the
protection so that they can only select and autofilter, but cannot edit
cells. However, I have to unprotect it for myself all the time and then I
save it forgetting to protect it again. There has to be an easier way so
that other people can't edit and I don't have to keep putting in password.
Right?

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 cells in excel to prevent users from deleting formulae locking cells in excel Excel Discussion (Misc queries) 2 June 14th 06 05:56 PM
Protect Execl data for different users. Saurabh Excel Discussion (Misc queries) 1 May 30th 06 09:28 AM
Protect a worksheet, but allow ONLY specific users to change info tara Excel Worksheet Functions 1 February 18th 06 12:10 AM
How can I protect cells and allow users to insert/delete Jammy Dodger Excel Worksheet Functions 1 January 12th 06 10:20 AM
Protect shouldn't default to "allow users to select locked cells" JudiMicro Setting up and Configuration of Excel 0 November 18th 05 05:00 PM


All times are GMT +1. The time now is 09:51 AM.

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"