Set FormulaCells = ActiveSheet.Range("A1").SpecialCells(xlFormulas, xlNumbers + xlTextValues + xlLogical)
If Not IsEmpty(FormulaCells) Then
For Each Area In FormulaCells.Areas
.Locked = True
If that's not what you want to do, please explain further.
As in, you had a worksheet with 10000's (or however many )of formulas on it and you didn't want to search thru and lock each cell with a formula manually.
We need more details about what you're doing. What it does now...what you want it to do...when should it protect a cell with a formula (once or every time a formula is entered??) What does the userform do? What is overwriting your formulas that you need them to be locked...and why is it overwriting them?
Any code you already have that's relevant to what you're trying to accomplish would be helpful.