A voir également:
- Vba copier coller à la suite
- Dessin a copier coller ✓ - Forum Internet / Réseaux sociaux
- Erreur 1004 vba ✓ - Forum VB / VBA
- Coeur copier coller ✓ - Forum Internet / Réseaux sociaux
- Vba l'indice n'appartient pas à la sélection - Forum VB / VBA
- Copier video youtube - Guide
1 réponse
f894009
Messages postés
16904
Date d'inscription
dimanche 25 novembre 2007
Statut
Membre
Dernière intervention
18 mars 2023
1 678
22 avril 2015 à 12:14
22 avril 2015 à 12:14
Bonjour,
Application.ScreenUpdating = True
Application.ScreenUpdating = False
' Créer le fichier
Set fSys = CreateObject("Scripting.FileSystemObject")
Set monFichierTxt = fSys.CreateTextFile(REPERTOIRE_NOM & today & FICHIER_DEST & ".txt")
monFichierTxt.Close
' Ouvrir le fichier
Workbooks.OpenText Filename:=REPERTOIRE_NOM & today & FICHIER_DEST & ".txt"
'boucle sur les onglets
For i = 0 To UBound(CONTREPARTIES)
'mise en memoire infos
TInfos = ThisWorkbook.Sheets(CONTREPARTIES(i)).UsedRange
'premiere cellule vide colonne A
derlig = Range("A" & Rows.Count).End(xlUp).Row
If derlig > 1 Then derlig = derlig + 1
'ecriture infos dans fichier txt
Range("A" & derlig).Resize(UBound(TInfos, 1), UBound(TInfos, 2)) = TInfos
Next i
Application.ScreenUpdating = True
17 mai 2015 à 13:21