Morning everyone,
I have a workbook that is going to be used by someone who has a (deserved) reputation for wrecking data. I am trying to restrict her access to the sheet, so she can enter but not ruin things.
I have set it up so that the restrictions only apply to her network log-on (using this function)
and then the protection after:
The bit I am having issues with is that I want if a cell has data is (I have text, dates, integers and functions) then if she types anything into the cell it will just replace it with the value it had previously. I have a code that works, but have no way to trigger it as there is no afterchange event, and I cannot figure out how to do it. The code I have is below:
I would be grateful if anyone has any ideas on how I can get this to work, or anything else that would give me the same effect.
As always I am thankful for your help and support.
Rhod
I have a workbook that is going to be used by someone who has a (deserved) reputation for wrecking data. I am trying to restrict her access to the sheet, so she can enter but not ruin things.
I have set it up so that the restrictions only apply to her network log-on (using this function)
Code:
Function isPermitted() As Boolean
If UBound(Filter(Application.Transpose(Sheets("MySecretSheet").Range("A1:A10").Value), Environ("username"))) = 0 Then isPermitted = True
End Function
and then the protection after:
Code:
If Not isPermitted() Then
The bit I am having issues with is that I want if a cell has data is (I have text, dates, integers and functions) then if she types anything into the cell it will just replace it with the value it had previously. I have a code that works, but have no way to trigger it as there is no afterchange event, and I cannot figure out how to do it. The code I have is below:
Code:
Dim p As Variant
p = ActiveCell.Value
If ActiveCell.Value = "" Then
GoTo ender
Else
' ActiveCell.Offset(0, 100).Select
ActiveCell.Value = p
End If
ender:
I would be grateful if anyone has any ideas on how I can get this to work, or anything else that would give me the same effect.
As always I am thankful for your help and support.
Rhod