Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
To anybody kind enough to take the time to read my post,
I am working on a very simple and basic excel workbook in which I have many work sheets for different clients with a questionnaire that each client must complete One of the questions requires either it be left blank or marked with an "x". The question is located in column S and applies to all account of the clients. If an "x' is placed, then I would like the three following columns to be unlocked (column T, U, V) so that they can be answered. Therefore if row 12 has S12 marked with an "x",then T12:V12 will be unlocked. However if S13 is left blank then S13:V13 are left locked and so on..... Is there anybody who can help me. Thank you so much for your time, Hakan Please email me for any suggestions. All the best |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hi hak0828
You can use the change event in the sheet module http://www.rondebruin.nl/code.htm If you change a cell in S and it is a "x" it will unprotect the sheet unlock the three cells and protect the sheet. If it is not a "x" it lock the cells I not use a password in this example Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column = 19 Then '= column S ActiveSheet.Unprotect If LCase(Target.Value) = "x" Then Cells(Target.Row, "T").Resize(, 3).Locked = False Else Cells(Target.Row, "T").Resize(, 3).Locked = True End If ActiveSheet.Protect End If End Sub -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "hak0828" wrote in message ... To anybody kind enough to take the time to read my post, I am working on a very simple and basic excel workbook in which I have many work sheets for different clients with a questionnaire that each client must complete One of the questions requires either it be left blank or marked with an "x". The question is located in column S and applies to all account of the clients. If an "x' is placed, then I would like the three following columns to be unlocked (column T, U, V) so that they can be answered. Therefore if row 12 has S12 marked with an "x",then T12:V12 will be unlocked. However if S13 is left blank then S13:V13 are left locked and so on..... Is there anybody who can help me. Thank you so much for your time, Hakan Please email me for any suggestions. All the best |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
lock cells based on interior color | Excel Discussion (Misc queries) | |||
lock cells based on formula | Excel Programming | |||
lock cells based on formula result | Excel Discussion (Misc queries) | |||
Moving from unlocked cells to unlocked cells in an excel form | Excel Worksheet Functions | |||
How do I lock all cells in Excel except 2 which I need unlocked? | Excel Discussion (Misc queries) |