First time doing this...
I've created a script at this point that is doing what I want.
I've also applied this bit below to the Sheet tab in order to cause the cells to be updated automatically any time certain cells are modified:
That works great....except when I finally locked the sheet down and protected it.
Now, every time I modify one of the user-configurable cells, I get the message:
"Run-time error '1004':
The cell or chart you're trying to change is on a protected sheet. Blah, blah, blah.
It appears to be caused by the script setting a value to one of the cells in the sheet (which is locked).
I can band-aid this by simply unlocking that one cell...but it would be nice if I didn't have to do that.
I've found something that supposedly fixes this, but I don't know how it's applied.
Is this ALSO supposed to be applied to the sheet tab? If so, can I combine both of these onto the same tab?
I've created a script at this point that is doing what I want.
I've also applied this bit below to the Sheet tab in order to cause the cells to be updated automatically any time certain cells are modified:
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("B4:B17")) Is Nothing Then
Call FindOptimized_APs
End If
End Sub
That works great....except when I finally locked the sheet down and protected it.
Now, every time I modify one of the user-configurable cells, I get the message:
"Run-time error '1004':
The cell or chart you're trying to change is on a protected sheet. Blah, blah, blah.
It appears to be caused by the script setting a value to one of the cells in the sheet (which is locked).
I can band-aid this by simply unlocking that one cell...but it would be nice if I didn't have to do that.
I've found something that supposedly fixes this, but I don't know how it's applied.
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Target.Locked = True Then Application.Undo
Application.EnableEvents = True
End Sub
Is this ALSO supposed to be applied to the sheet tab? If so, can I combine both of these onto the same tab?
Last edited: