Bonjour a tous le forum ,
Tout d'abords je vous prie de m'excuser pour le retard . J'ai réussi à trouver une solution a mon problème en vba .
je vous dépose ici la macro qui fonctionne pour ceux que cela pourrais êtres intéresser
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
vous remerciant pour tout l vos conseille je vous dit a bienôt peut-être et je ferme se fil