Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro to Protect the Whole Workbook and Allow Range Edits
Hi, there!
I was wondering if it's possible to create a macro that would password protect the whole workbook at once without having to protect each individual sheet, and at the same time allow users to edit a specific range. Thanks! |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro to Protect the Whole Workbook and Allow Range Edits
Hi,
Do you mean this? Sub sonic() For x = 1 To Worksheets.Count Sheets(x).Range("A1:H10").Locked = False Sheets(x).Protect Password:="MyPass" Next End Sub Unlock as many/few cells in each sheet as you require. Mike "EugeniaP" wrote: Hi, there! I was wondering if it's possible to create a macro that would password protect the whole workbook at once without having to protect each individual sheet, and at the same time allow users to edit a specific range. Thanks! |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro to Protect the Whole Workbook and Allow Range Edits
Mike,
It's giving me a run-time error '1004' Unable to set the Locked property of the Range class. EugeniaP "Mike H" wrote: Hi, Do you mean this? Sub sonic() For x = 1 To Worksheets.Count Sheets(x).Range("A1:H10").Locked = False Sheets(x).Protect Password:="MyPass" Next End Sub Unlock as many/few cells in each sheet as you require. Mike "EugeniaP" wrote: Hi, there! I was wondering if it's possible to create a macro that would password protect the whole workbook at once without having to protect each individual sheet, and at the same time allow users to edit a specific range. Thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Use Macro to protect choosen sheets in workbook | Excel Discussion (Misc queries) | |||
Sharing Workbook - allowing multiple edits | Excel Discussion (Misc queries) | |||
Can I allow Additions but not Edits? | Excel Discussion (Misc queries) | |||
Protect Workbook Vs Protect Sheet | New Users to Excel | |||
Limiting edits | Excel Discussion (Misc queries) |