First off all i would suggest you clean up the code a bit, before troubleshooting this error.
Your code does a lot of selecting and activating, wich slows down the code, and makes it harder to read.
Example:
Sheets("sheet1").Select
Range("A2").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.NumberFormat = "d/m/yyyy"
Can be rewritten like this
Sheets(1).Range("A2:A" & Range("A2").End(xlDown).Row).format = "d/m/yyyy"
Or
The whole column
Sheets(1).Columns(1).Format = "d/m/yyyy"
Try and clean the code up a bit, then maby the error will be more visible for you.
Bookmarks