Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm using Office 2007
Thru VBA-coding I'm protecting my worksheet so that the users can only select and enter data into certain fields (those fields have been unchecked for "Locked" in the Format Cells.../Protection). At a certain event (pushbutton) I would like to have those unprotected cells also being protected ("no more input allowed") until another "Reset"- event/pushbutton opens up those cells again for input. I didn't find any VBA-Help for such a coding... Any proposal? Harry |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Harry
Unprotect the sheet, change the Locked property for the desired cells to True and reprotect the sheet. To reset just change the Locked property to False. 'Protect TargetCells Sheets("Sheet1").Unprotect Range("TargetCells").Locked = True Sheets("Sheet1").Protect Regards, Per "Hartmut (Harry) Kloppert" skrev i meddelelsen ... I'm using Office 2007 Thru VBA-coding I'm protecting my worksheet so that the users can only select and enter data into certain fields (those fields have been unchecked for "Locked" in the Format Cells.../Protection). At a certain event (pushbutton) I would like to have those unprotected cells also being protected ("no more input allowed") until another "Reset"- event/pushbutton opens up those cells again for input. I didn't find any VBA-Help for such a coding... Any proposal? Harry |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you Per, that works perfectly.
(I didn't find anything in the Help-file though) Harry "Per Jessen" wrote in message ... Hi Harry Unprotect the sheet, change the Locked property for the desired cells to True and reprotect the sheet. To reset just change the Locked property to False. 'Protect TargetCells Sheets("Sheet1").Unprotect Range("TargetCells").Locked = True Sheets("Sheet1").Protect Regards, Per "Hartmut (Harry) Kloppert" skrev i meddelelsen ... I'm using Office 2007 Thru VBA-coding I'm protecting my worksheet so that the users can only select and enter data into certain fields (those fields have been unchecked for "Locked" in the Format Cells.../Protection). At a certain event (pushbutton) I would like to have those unprotected cells also being protected ("no more input allowed") until another "Reset"- event/pushbutton opens up those cells again for input. I didn't find any VBA-Help for such a coding... Any proposal? Harry |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Harry,
Thanks for your reply, I'm glad that you made it work Per "Hartmut (Harry) Kloppert" skrev i meddelelsen ... Thank you Per, that works perfectly. (I didn't find anything in the Help-file though) Harry |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Protecting worksheet | Excel Discussion (Misc queries) | |||
Protecting a worksheet | Excel Programming | |||
Protecting Entire Workbook from Deletion | Excel Discussion (Misc queries) | |||
Protecting an entire workbook | Excel Programming | |||
Protecting worksheet | Excel Programming |