I am trying to delete a row if the value I check is 0. So far I did almost the exact same in another set of workbooks, and it went just fine. Both cases involve getting the agency's name from the startup workbook, then opening the first workbook of the set that needs deletion, looping through it and deleting what needs to be deleted, closing it and moving on to the next one (here I go from 2 to 2 because there's no need to go through all of them just yet)
I did my homework and looked it up beforehand. No, not my table nor my sheet nor my workbook nor any range is protected. Yes, I made sure to activate the workbook I want to affect, and it has only one sheet in it. Using .Select works, deleting manually isn't possible. It seems a cell is locked, but even unlocking it doesn't allow me to manually delete the row. here it's unlocked.
Edit - I tried running it with the original set of workbooks, and it worked just fine (the one I'm working with is a copy of the original)
Sub PetitTas()
deb = Now()
For i = 2 To 2
Workbooks("dimensionnement technos 2").Activate
Agence = Cells(i, 24)
Workbooks.Open "C:\Users\QNS691\Documents\Excel\par agence 2\" & Agence & ".xlsx"
Workbooks(Agence).Activate
For j = 2 To Cells(Rows.Count, 1).End(xlUp).Row
If Cells(j, 14) = 0 Then
Rows(j).EntireRow.Delete
End If
Next j
Workbooks(Agence).Close SaveChanges:=True
Next i
MsgBox deb & " " & Now()
End Sub
I am running out of ideas, please help!