Hi All,
I recorded a macro to add a row, which is working fine. Code is:
Sub AddRequest()
Rows("4:4").Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Rows("5:5").Select
Selection.Copy
Range("A4").Select
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:= _
xlNone, SkipBlanks:=False, Transpose:=False
ActiveSheet.Paste
Rows("4:4").ClearContents
End Sub
However what I'd like it to do is to have all rows under the added row remain locked, and when a new row is added, the new row (and the rows that were previously added) to be unlocked. The purpose of this is that I need to export the data to a database, and therefore hopefully preserve data integrity. The worksheet is password protected. Can anyone offer any suggestions? Thanks in advance.
Bookmarks