J
John
I have created a list using the Create List function. The users input
into the list using drop down lists. Other fields are completed using
formulars. I want to protect the formulars however if I use Protect
Sheet the list cannot be updated.
I found this bit of code on this group that works fine however it will
not allow the users to delete rows and I need that functionality.
Can I add a few lines of code that will do the job?
Private Sub Worksheet_Change(ByVal Target As Range)
Dim myRng As Range
Set myRng = Me.Range("AGRegionsProtected")
On Error GoTo errHandler:
If Intersect(Target, myRng) Is Nothing Then
'let 'em do it
Else
With Application
.EnableEvents = False
.Undo
End With
MsgBox "I've asked you not to change this range!"
End If
errHandler:
Application.EnableEvents = True
End Sub
Thanks,
John
into the list using drop down lists. Other fields are completed using
formulars. I want to protect the formulars however if I use Protect
Sheet the list cannot be updated.
I found this bit of code on this group that works fine however it will
not allow the users to delete rows and I need that functionality.
Can I add a few lines of code that will do the job?
Private Sub Worksheet_Change(ByVal Target As Range)
Dim myRng As Range
Set myRng = Me.Range("AGRegionsProtected")
On Error GoTo errHandler:
If Intersect(Target, myRng) Is Nothing Then
'let 'em do it
Else
With Application
.EnableEvents = False
.Undo
End With
MsgBox "I've asked you not to change this range!"
End If
errHandler:
Application.EnableEvents = True
End Sub
Thanks,
John