Forum Discussion
MicrosoftNewbie121
Jan 24, 2024Brass Contributor
VBA Excel : Error 1004 - Delete Method out of Range class failed
Hello can you help me ?
i get error1004 after executing this macro, it has something to do with delete method could you please help me fixing that ?
(Base bellow for testing)
The code tries to delete the header row of the table on Updated.
To avoid that, change the line
Set idCol2 = WSheet2.Range("B2:B" & lastRow2)
to
Set idCol2 = WSheet2.Range("B3:B" & lastRow2)
The code tries to delete the header row of the table on Updated.
To avoid that, change the line
Set idCol2 = WSheet2.Range("B2:B" & lastRow2)
to
Set idCol2 = WSheet2.Range("B3:B" & lastRow2)
- MicrosoftNewbie121Brass ContributorThank you sooo much for your help 🙂 it's working like a charm !