Hi Jeffro in Australia (hope alls OK on the other side of the world)
I have the same issues and have found staff will only bust anything they can get their hands on so PW protect is the answer - to unlock and lock on the fly via a diff Script will need some cool code - i have never solved this issue, but what i have done before is call another editable macro say call Input: at a given pount and them ahve the editable part there just a few lines of code and re call the original macro and continue so then you have the best of both worlds, and if the staff access the called code it simple and quick to replace, i save all macros to *.bas by export so i can import in a second and repair damage without effort or care,
HTH
Jack in the UK
Jeffro,
You can also checkout my response to Sue in the thread that is four threads above yours. Unfortunately the answer is basically "No" but I also give some possible avenues of "attack" for this problem (none of which is my original thinking, but checkout my response and you'll see what I mean.)
good luck
This will Lock and unlock
Sub myUnLock()
'This code will unprotect the sheet.
Application.EnableEvents = False
Application.DisplayAlerts = False
ActiveSheet.Unprotect ("admin")
Application.EnableEvents = True
Application.DisplayAlerts = True
End Sub
Place this code in a module.
Private Sub Worksheet_Change(ByVal Target As Range)
'
' Macro by Joseph S. Was
'
Application.EnableEvents = False
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True, Password:="admin"
Application.EnableEvents = True
End Sub
Then this code go's in the Sheet module to re-protect after the module UnProtect code has finished. Put your code in the unprotect module. JSW