A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
No those are all cells that when I click a button are deleted. But I need to protect the worksheet so, could I go about doing that, while still allowing everything to work?
Hi,
If the second piece of code is attached to a button then you can unprotect at run time, clear the cells and re-protect like this.
Sub ClearEverything()
ActiveSheet.Unprotect
Range( _
"B10:B14,E10:E14,I14:I16,H21:J22,D26,C26,C27:C28,D28:E28,E27,E26,J25:J28,Q24:Q25,Q14,Q5:R11" _
).ClearContents
Range("Q5:R5").Select
ActiveSheet.Protect
End Sub
Going back to the first snippet of code you can't make that work in its current form for the reasons I gave in my last post.