Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
I have set my w/sheet to "protect" with some cell left "un-protected" for
easy data entry. I want to share my w/sheet and increase it's security level. Is there a way to set the w/sheet on a "auto-protect" mode so that the file is "protected" every time I close the file?. Using the manual "protect sheet" is not so efficient as we tend to forget to "re-protect" it again when we "unprotect" the w/sheet for maintainance purposes. |
#2
![]() |
|||
|
|||
![]()
You could get excel to automatically protect sheets when the workbook is
closed. To do this you would use the workbook beforeclose event. Right Click the Excel icon just to the left of the file menu. Select View Code to display the Workbook code sheet. Paste this code into the sheet. Private Sub Workbook_BeforeClose(Cancel As Boolean) Dim sht As Worksheet For Each sht In Worksheets sht.Protect Next sht End Sub This will protect every worksheet in your workbook. If you want to protect just one sheet say "Sheet1" then the code should read: Private Sub Workbook_BeforeClose(Cancel As Boolean) Sheets("Sheet1").Protect End Sub Hope this helps Rowan "West" wrote: I have set my w/sheet to "protect" with some cell left "un-protected" for easy data entry. I want to share my w/sheet and increase it's security level. Is there a way to set the w/sheet on a "auto-protect" mode so that the file is "protected" every time I close the file?. Using the manual "protect sheet" is not so efficient as we tend to forget to "re-protect" it again when we "unprotect" the w/sheet for maintainance purposes. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Auto Protect workbook with password upon opening | Excel Worksheet Functions | |||
is there a way to protect a range of cells on a worksheet? | Excel Discussion (Misc queries) | |||
lost my password (worksheet protect) | Excel Discussion (Misc queries) | |||
How to protect Option button in worksheet | Excel Worksheet Functions | |||
Auto Filter will not work in a new worksheet | Excel Worksheet Functions |