I am trying to write a macro that protects a sheets formatting - most specifically the cell size and margins. But I want to allow the cells themselves to be edited. I can't figure out what the correct settings are for this with the Protect command. I keep finding examples that do the opposite.
This is my current code and it doesn't stop columns from being inserted.
Sub SetProtection()
'
' SetProtection Macro
'
ActiveSheet.Protect UserInterfaceOnly, Contents:=False, AllowInsertingColumns:=False
End Sub
What am I doing wrong?
Thanks,
Deanna
Bookmarks