![]() |
|
Forum
|
|
|
#1 (permalink) |
|
Guest
Messages: n/a
|
Bonjour le forum
comment complèter la procédure suivante pour quelle s'enclenche toutes les 80 lignes à chaque nouvelle ouverture ? Private Sub CommandButton2_Click() 'bouton 'Enregistrer la fiche' ' Dim Wb1 As Workbook Dim Wb2 As Workbook Dim Mois As String Dim I As Integer Dim y As Integer ' Mois = ActiveSheet.Range('C3').Value Set Wb1 = Workbooks.Open(Chemin) Set Wb2 = ThisWorkbook Wb2.Sheets('Détail').Range('A1:G29').Copy Destination:=Wb1.Sheets(Mois) _ .Range('A65536').End(xlUp) Wb2.Sheets('Facture').Range('1:50').Copy Destination:=Wb1.Sheets(Mois) _ .Range('A65536').End(xlUp).Offset(1, 0) With Wb1.Sheets(Mois) For I = 1 To .Range('A1:G29').Columns.Count .Columns(I).ColumnWidth = Wb2.Sheets('Détail').Columns(I).ColumnWidth Next y = 1 For I = 2 To .Range('A1:G29').Rows.Count .Rows(I).RowHeight = Wb2.Sheets('Détail').Rows(y).RowHeight Next End With Application.CutCopyMode = False Wb1.Save Wb1.Close End Sub vos remerciant par avance de toute l'aide que vous me donnerais . Je vous dis donc à bientôt sur se fil BR44 |
|
|
| ANNONCES | |
![]() |
| Liens sociaux |
| Outils de la discussion | |
|
|