Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have a workbook with 10 sheets, 7 sheets used for Data entry (which I don't
want anyone to be able to change) and 3 for anybody to work with the data on a day to day basis without them being able to corrupt the original. I know of the Macro to protect the whole workbook but what I would like is to be able to protect the 7 Data sheets and leave the 3 working sheets unlocked. Hope this makes sense to you. Thx in advance |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Maybe something like:
Option Explicit Sub testme() Dim myPWD As String Dim wks As Worksheet myPWD = "TopSeCrET" For Each wks In ActiveWorkbook.Worksheets Select Case LCase(wks.Name) 'make sure you use lower case when you change these! Case Is = "sheet1", "sheet2", "sheet5", "sheet99", _ "sheet100", "another sheet", "and one more", "lastone" wks.Protect Password:=myPWD Case Else 'do nothing End Select Next wks End Sub kevhatch wrote: I have a workbook with 10 sheets, 7 sheets used for Data entry (which I don't want anyone to be able to change) and 3 for anybody to work with the data on a day to day basis without them being able to corrupt the original. I know of the Macro to protect the whole workbook but what I would like is to be able to protect the 7 Data sheets and leave the 3 working sheets unlocked. Hope this makes sense to you. Thx in advance -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how do I email amacro? | Excel Worksheet Functions | |||
Protect Workbook vs Worksheet?? | Excel Worksheet Functions | |||
VBA Code To have a macro repeat on all sheets in a workbook | Excel Worksheet Functions | |||
Macro to link Sheets to main workbook | Excel Discussion (Misc queries) | |||
Playing a macro from another workbook | Excel Discussion (Misc queries) |