Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Protect sheets from editing but allowing macro to do so?
Is it possible to protect all the sheets from a workbook from editio
allowing the macros to edit the cells and so on? Best Regards Noo -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Protect sheets from editing but allowing macro to do so?
Hi Nook,
Try: Dim sh As Worksheet For Each sh In ActiveWorkbook.Sheets ActiveSheet.Protect password:="PW", _ UserInterfaceOnly:=True Next Replace PW with your designated password --- Regards, Norman "NooK " wrote in message ... Is it possible to protect all the sheets from a workbook from edition allowing the macros to edit the cells and so on? Best Regards NooK --- Message posted from http://www.ExcelForum.com/ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Protect sheets from editing but allowing macro to do so?
Hi Nook,
Typo warning! The code should read: Replace activesheet with sh --- Regards, Norman "Norman Jones" wrote in message ... Hi Nook, Try: Dim sh As Worksheet For Each sh In ActiveWorkbook.Sheets ActiveSheet.Protect password:="PW", _ UserInterfaceOnly:=True Next Replace PW with your designated password --- Regards, Norman "NooK " wrote in message ... Is it possible to protect all the sheets from a workbook from edition allowing the macros to edit the cells and so on? Best Regards NooK --- Message posted from http://www.ExcelForum.com/ |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Protect sheets from editing but allowing macro to do so?
To remove unintentional confusion:
For Each sh In ActiveWorkbook.Sheets sh.Protect password:="PW", _ UserInterfaceOnly:=True Next sh --- Regards, Norman -- --- Regards, Norman "Norman Jones" wrote in message ... Hi Nook, Typo warning! The code should read: Replace activesheet with sh --- Regards, Norman "Norman Jones" wrote in message ... Hi Nook, Try: Dim sh As Worksheet For Each sh In ActiveWorkbook.Sheets ActiveSheet.Protect password:="PW", _ UserInterfaceOnly:=True Next Replace PW with your designated password --- Regards, Norman "NooK " wrote in message ... Is it possible to protect all the sheets from a workbook from edition allowing the macros to edit the cells and so on? Best Regards NooK --- Message posted from http://www.ExcelForum.com/ |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Protect sheets from editing but allowing macro to do so?
To protect al sheets in the Workbook
For each Sh in Worksheets.Count Sh.Protect UserInterFaceOnly:=True Next Regards, Don "NooK " wrote in message ... Is it possible to protect all the sheets from a workbook from edition allowing the macros to edit the cells and so on? Best Regards NooK --- Message posted from http://www.ExcelForum.com/ |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Protect sheets from editing but allowing macro to do so?
Thanks a lot. Mostly appreciated.
Worked like a charm. Best Regards Noo -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
URGENT: Double Clicking Not Allowing Editing In Cell | Excel Discussion (Misc queries) | |||
Allowing editing locked cells in a protected sheet in excel | Excel Worksheet Functions | |||
How do I protect a number of sheets allowing the user to add a com | New Users to Excel | |||
Macro allowing pauses for editing | Excel Discussion (Misc queries) | |||
Protect macro code from viewing/editing | Excel Programming |