WBA Fichier par Onglet : "Erreur d'éxécution 1004 la methode copy de la cla
Fermé
courtoisy74
Messages postés
1
Date d'inscription
mardi 12 octobre 2021
Statut
Membre
Dernière intervention
12 octobre 2021
-
12 oct. 2021 à 17:02
cs_Le Pivert Messages postés 7903 Date d'inscription jeudi 13 septembre 2007 Statut Contributeur Dernière intervention 11 mars 2024 - 12 oct. 2021 à 17:42
cs_Le Pivert Messages postés 7903 Date d'inscription jeudi 13 septembre 2007 Statut Contributeur Dernière intervention 11 mars 2024 - 12 oct. 2021 à 17:42
A voir également:
- WBA Fichier par Onglet : "Erreur d'éxécution 1004 la methode copy de la cla
- Fichier rar - Guide
- Fichier host - Guide
- Fichier iso - Guide
- Comment réduire la taille d'un fichier - Guide
- Ouvrir fichier .bin - Guide
2 réponses
yg_be
Messages postés
22720
Date d'inscription
lundi 9 juin 2008
Statut
Contributeur
Dernière intervention
23 avril 2024
1 476
12 oct. 2021 à 17:31
12 oct. 2021 à 17:31
bonjour,
le code me semble correct. Peux-tu partager un fichier avec lequel tu as cette erreur?
le code me semble correct. Peux-tu partager un fichier avec lequel tu as cette erreur?
cs_Le Pivert
Messages postés
7903
Date d'inscription
jeudi 13 septembre 2007
Statut
Contributeur
Dernière intervention
11 mars 2024
728
12 oct. 2021 à 17:42
12 oct. 2021 à 17:42
Bonjour,
essaie ceci:
essaie ceci:
Option Explicit Sub saveOnglet() Dim ws Dim newWk As Workbook For Each ws In Worksheets Set newWk = Workbooks.Add(xlWBATWorksheet) ws.Copy newWk.Sheets(1) newWk.SaveAs (ThisWorkbook.Path & "\" & ws.Name & ".xlsx") newWk.Close Set newWk = Nothing Next ws End Sub