bjkluft
New Member
- Joined
- Jun 23, 2021
- Messages
- 2
- Office Version
- 2013
- Platform
- Windows
Hello,
Hopefully somebody can help me with the following issue. And taking in account that I found a huge amount of solutions already at MrExcel, my expectations are high
I have the following situation:
A password protected worksheet with a specific cell (for example B2) that is unlocked, the user can edit the contents of this cell.
However under specific situations (if, for example, cell A2 has the value FALSE), it is no longer allowed to change the contents of the cell.
Is there a way that I can dynamically disable the contents of that cell?
Any help would be appriciated!
Kind regards,
Jeroen
Hopefully somebody can help me with the following issue. And taking in account that I found a huge amount of solutions already at MrExcel, my expectations are high
I have the following situation:
A password protected worksheet with a specific cell (for example B2) that is unlocked, the user can edit the contents of this cell.
However under specific situations (if, for example, cell A2 has the value FALSE), it is no longer allowed to change the contents of the cell.
Is there a way that I can dynamically disable the contents of that cell?
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If range("A2").value = "FALSE" then
range("B2").EnableSelection = False ' I know the EnableSelection is non-existing
end if
End Sub
Any help would be appriciated!
Kind regards,
Jeroen