Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Disable a range of Cells
How can I disable a range of cells only for them to become active depending
on the value of another specific cell? I don't want the cells to accept any input data unless it meets the criteria specified on another cell. For instance, on the 29th day of February. Many thanks. |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Disable a range of Cells
Hi SU
This example unlock the cells A5:C10 if cell A1 = "ron" (Unlock cell A1 also before you try it) It unprotect/protect the sheet without a password this example but you can add a password if you want 'Place the code in the Sheet module ' 'Right click on a sheet tab and choose view code 'Paste the code there 'Alt-Q to go back to Excel Private Sub Worksheet_Change(ByVal Target As Range) If Not Application.Intersect(Range("A1"), Target) Is Nothing Then If Target.Value = "ron" Then Me.Unprotect Range("A5:C10").Locked = False Me.Protect Else Me.Unprotect Range("A5:C10").Locked = True Me.Protect End If End If End Sub -- Regards Ron de Bruin http://www.rondebruin.nl "SU" wrote in message ... How can I disable a range of cells only for them to become active depending on the value of another specific cell? I don't want the cells to accept any input data unless it meets the criteria specified on another cell. For instance, on the 29th day of February. Many thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro to hide blank cells in a range | Excel Discussion (Misc queries) | |||
Display first, second, etc Nonblank Cells in a Range | Excel Worksheet Functions | |||
Counting empty cells within a range of cells | New Users to Excel | |||
Counting empty cells within a range of cells | New Users to Excel | |||
Count cells in one range based on parameters in another range | Excel Worksheet Functions |