I'm a total novice when it comes to VBA and have created my VBA based off tutorials online. A bit of background: my dataset is made up of 3 sheets with different information, if data is entered into the first sheet with a specific criteria, that whole row then moves into the second sheet, where further can be entered. if on the second sheet an option is selected that entire row must then move to the third sheet. So essentially i will only ever have 1 copy of any one record.
The problem i am having, is that when the row is cut from sheet 1 to sheet 2, i then cannot then edit that particular data in sheet 2 without a duplicate copy being created, its as if the paste hasn't been found even though the pasted data is there and is editable.
I am using an index row if that is helpful. cut cells are pasted to new sheet and the row deleted from the original sheet
please someone, anyone who can fix this it would be greatly appreciated.
here is the code for the cut/paste
Private Sub
CommandButton4_Click()
a = Worksheets("Database").Cells(Rows.Count, 1).End(xlUp).Row
For i = 2 To a
If Worksheets("Database").Cells(i, 16).Value = "Retention" Then
Worksheets("Database").Rows(i).Cut
Worksheets("Archive").Activate
b = Worksheets("Archive").Cells(Rows.Count, 1).End(xlUp).Row
Worksheets("Archive").Cells(b + 1, 1).Select
ActiveSheet.Paste
Worksheets("Database").Activate
Rows(i).EntireRow.Delete
MsgBox "ARCHIVE RECORDS UPDATED", vbInformation
End If
Next
End Sub
(this is duplicated for 2x sheets) –