I have developed a few forms with this functionality, so it's totally possible.
In one form, I have a up/down arrow object that allows users to change the year for the annual employee review form, which unlocks the sheet, changes the date, relocks the sheet.
Private Sub SpinButton1_SpinDown()
ActiveSheet.Unprotect "prettypinkponies"
With Range("b1")
.Value = WorksheetFunction.Max(1900, .Value - 1)
End With
ActiveSheet.Protect "prettypinkponies"
End Sub
and
Private Sub SpinButton1_SpinUp()
ActiveSheet.Unprotect "prettypinkponies"
With Range("b1")
.Value = WorksheetFunction.Min(2999, .Value + 1)
End With
ActiveSheet.Protect "prettypinkponies"
End Sub
Your variation could be something as simple as:
Private Sub Button1_Click()
ActiveSheet.Unprotect "slightlylessweirdpassword"
With Range("something")
formulasomethingsomething
End With
ActiveSheet.Protect "slightlylessweirdpassword"
End Sub
Bookmarks