Is there a way I can temporarily disable automatic protecting in the following code?
What it's doing is...
I Unprotect the sheet, make an edit in a cell or a range of cells, then page goes back to being protected. Then i have unprotect the sheet again, make an edit, then it pops right back to protected. I'm looking for a way to temporarily disable that password protection without deleting the lines of code because I will end up wanting to reenable that code to protect again when i'm done making edits.
Any ideas?
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim rng As Range
Application.EnableEvents = False
ActiveSheet.Unprotect Password:="WellingtonFrac"
Set rng = Intersect(Target, Range("E8:CZ31, E48:CZ59"))
If Not rng Is Nothing Then Call Capitalise(rng)
Set rng = Intersect(Target, Range("D55:D1585"))
If Not rng Is Nothing Then Call ConvertToTime(rng)
ActiveSheet.Protect Password:="WellingtonFrac"
Application.EnableEvents = True
End Sub
What it's doing is...
I Unprotect the sheet, make an edit in a cell or a range of cells, then page goes back to being protected. Then i have unprotect the sheet again, make an edit, then it pops right back to protected. I'm looking for a way to temporarily disable that password protection without deleting the lines of code because I will end up wanting to reenable that code to protect again when i'm done making edits.
Any ideas?