Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Lock Cell if another cell contains data
Say we have worksheets sa and sb. In worksheet code for sa enter:
Private Sub Worksheet_Change(ByVal Target As Range) Call routine End Sub In a standard module: Sub routine() Dim w As Worksheet Set w = Worksheets("sb") For Each r In w.UsedRange r.Locked = r.HasFormula Next End Sub -- Gary's Student "adodson" wrote: I would like to lock formulas in cells on worksheet B if data is entered in worksheet A. Otherwise, the user would need to enter data on top of the formula. How would I go about this? I tried looking through other posts and couldn't find this... so thanks for any assistance you may offer. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Lock data in a cell a specific cell based on selection on other ce | Excel Worksheet Functions | |||
Lock Data in Cell after entered | Excel Discussion (Misc queries) | |||
Lock Cell After Data Entry | Excel Discussion (Misc queries) | |||
Lock a cell when a given cell contains data | Excel Programming | |||
lock one cell when data in another | Excel Programming |