I am trying to delete Column A,B,D,E,F,W,X,Y,Z,AA,AB of the sheet FeuilleFP21. In order to do this I use as seen here and here:
FeuilleFP21.Range("A:B,D:F,W:AB").Delete
But it gives me the following error :
Execution error '1004': The 'Range' method of the '_Worksheet' object failed.
NOTE : FeuilleFP21 is set like that and in Execution window return the name of the sheet when I use ? ?FeuilleFP21.Name
Set FeuilleFP21 = ClasseurFp21.Worksheets(1)
What am I doing wrong ?
.Select..Range("A:B,D:F,W:AB").Select Selection.Delete?ActiveSheet.CodeNameand try with this one instead ofFeuilleFP21.