Erreur d'exécution 1004 sur macro enregistrée

The Wolf

XLDnaute Nouveau
Bonjour,
j'ai réalisé la macro ci-dessous avec l'enregistreur (car je n'y connait rien!) et elle ne marche pas :
"Erreur d'exécution 1004"
C'est une macro pour déplacer 3 feuilles d'un fichier vers un nouveau puis masquer 2 de ces 3 feuilles dans ce nouveau fichier
Merci mille fois pour votre aide.
The Wolf

Sub NO()

'

' NO Macro

'

' Touche de raccourci du clavier: Ctrl+n

'

Sheets(Array("SAISIE OBJ NAT", "Nord Ouest", "GLOBAL")).Select

Sheets("GLOBAL").Activate

ActiveSheet.DropDowns.Add(639.75, 89.25, 42.75, 16.5).Select

ActiveSheet.DropDowns.Add(468, 89.25, 64.5, 18).Select

ActiveSheet.DropDowns.Add(639, 117.75, 42.75, 16.5).Select

ActiveSheet.DropDowns.Add(639, 144.75, 42.75, 16.5).Select

ActiveSheet.DropDowns.Add(639, 171.75, 42.75, 16.5).Select

ActiveSheet.DropDowns.Add(639, 198.75, 42.75, 16.5).Select

ActiveSheet.DropDowns.Add(639, 225.75, 42.75, 16.5).Select

ActiveSheet.DropDowns.Add(639, 252.75, 42.75, 16.5).Select

ActiveSheet.DropDowns.Add(639, 279.75, 42.75, 16.5).Select

ActiveSheet.DropDowns.Add(639, 306.75, 42.75, 16.5).Select

ActiveSheet.DropDowns.Add(639, 333.75, 42.75, 16.5).Select

ActiveSheet.DropDowns.Add(468, 116.25, 64.5, 18).Select

ActiveSheet.DropDowns.Add(468, 143.25, 64.5, 18).Select

ActiveSheet.DropDowns.Add(468, 170.25, 64.5, 18).Select

ActiveSheet.DropDowns.Add(468, 197.25, 64.5, 18).Select

ActiveSheet.DropDowns.Add(468, 224.25, 64.5, 18).Select

ActiveSheet.DropDowns.Add(468, 251.25, 64.5, 18).Select

ActiveSheet.DropDowns.Add(468, 278.25, 64.5, 18).Select

ActiveSheet.DropDowns.Add(468, 305.25, 64.5, 18).Select

ActiveSheet.DropDowns.Add(468, 332.25, 64.5, 18).Select

ActiveSheet.DropDowns.Add(639, 116.25, 42.75, 16.5).Select

ActiveSheet.DropDowns.Add(639, 143.25, 42.75, 16.5).Select

ActiveSheet.DropDowns.Add(639, 170.25, 42.75, 16.5).Select

ActiveSheet.DropDowns.Add(639, 197.25, 42.75, 16.5).Select

ActiveSheet.DropDowns.Add(639, 224.25, 42.75, 16.5).Select

ActiveSheet.DropDowns.Add(639, 251.25, 42.75, 16.5).Select

ActiveSheet.DropDowns.Add(639, 278.25, 42.75, 16.5).Select

ActiveSheet.DropDowns.Add(639, 305.25, 42.75, 16.5).Select

ActiveSheet.DropDowns.Add(639, 332.25, 42.75, 16.5).Select

Sheets(Array("SAISIE OBJ NAT", "Nord Ouest", "GLOBAL")).Copy

Sheets(Array("SAISIE OBJ NAT", "GLOBAL")).Select

Sheets("GLOBAL").Activate

ActiveWindow.SelectedSheets.Visible = False

End Sub
 

Herdet

Nous a quitté
Repose en paix
Re : Erreur d'exécution 1004 sur macro enregistrée

Bonsoir,
Normalement avec ce code, cela devrait suffire :

Sub Deplacement_dans_nouveau_classeur()
Sheets(Array("SAISIE OBJ NAT", "Nord Ouest", "GLOBAL")).Copy
Sheets(Array("SAISIE OBJ NAT", "GLOBAL")).Visible = False
Range("A1").Select
End Sub

Attention : dupliquer des feuilles c'est ...)).Copy et les déplacer c'est ...)).Move
Cordialement
Robert

End Sub
 

Statistiques des forums

Discussions
312 489
Messages
2 088 855
Membres
103 979
dernier inscrit
bderradji