Thanks everyone for your code, although I'm having issues when I try to protect the sheet.
I don't necessarily want anyone to just go in and change things such as the item # or description. The only thing they should have the power to change is the column for "Quantity Taken". But when I unlock this column and protect the sheet, it gives errors and attempts to debug the code when I save a change. This is the part that is highlighted and assume the error comes from this section of the code:
.Range("D3").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
This is the total code:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
With ThisWorkbook.Worksheets("Inventory List")
.Range(.Cells(3, 6), .Cells(Rows.Count, 6).End(xlUp)).Copy
.Range("D3").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
.Range(.Cells(3, 5), .Cells(Rows.Count, 5)).ClearContents
.Range("E3").Select
End With
End Sub
Bookmarks