Bonjour à tous le forum ,
merci grâce à la résolution de mon dernier poste et après avoir modifier la macro transmise j'ai pus régler également se poste .
Voici la ma macro modifie .elle permet de copier des plages de taille variables les une à la suites des autres . Si cela pe rendre servie à quelqu'un j'en serais ravie .
voici la macro :
Private Sub CommandButton2_Click()
Dim wsSource As Worksheet, WsDestination As Worksheet, Adr As String
Set wsSource = Sheets("Détail Fiche Client")
Set WsDestination = Sheets("FCI " & wsSource.[f6].Value)
ColFin = ColonneDebut(wsSource.Range("B10:Bi10")) - 1
If wsSource.Cells(10, 2).Interior.ColorIndex = wsSource.Cells(10, ColFin).Interior.ColorIndex Then
ColDebut = 2
Else
For C = ColFin To 2 Step -1
If wsSource.Cells(10, C).Interior.ColorIndex = wsSource.Cells(10, ColFin).Interior.ColorIndex Then
ColDebut = C
Else
Exit For
End If
Next
End If
If WsDestination.Range("C6") = "" Then
Adr = "B6"
Set Rng = wsSource.Range("B6", wsSource.Cells(122, ColFin))
Else
Adr = "B7"
Set Rng = wsSource.Range("B7", wsSource.Cells(122, ColFin))
End If
Rng.Copy
WsDestination.Select
WsDestination.Activate
Range(Adr).Select
Range("CW7").End(xlToLeft).Offset(0, 1).PasteSpecial Paste:=xlPasteFormats
Range("CW7").End(xlToLeft).Offset(0, 1).PasteSpecial Paste:=xlPasteValues
Range(Cells(7, ColDebut + 1), Cells(7, ColFin)).HorizontalAlignment = xlCenterAcrossSelection
[A1].Select
End Sub
je vais donc conclure se poste en vous remerciant toutes et tous da le patience dont vous avez fait preuve et vous dit à bientôt peut-être sur un autre poste .