VBA collage spécial (valeur + format)

Bonjour au forum,

J'ai besoin de copier une ligne (valeur et format)

n'y a t-il pas une façon + élégante d'écrire ce code ?

            Range("ligne_saisie").Copy
        With Sheets("base")
            .Range("b65536").End(xlUp)(2).PasteSpecial Paste:=xlPasteValues
            .Range("b65536").End(xlUp).PasteSpecial Paste:=xlPasteFormats
            .Application.CutCopyMode = False
        End With

grouper les 2 collages sur la même ligne ?

bonne journée

Claude.

Bonjour,

Solution 1 ressemblant à la tienne

Range("A2").Copy
        With Sheets("base").Range("b65536").End(xlUp)
            .PasteSpecial Paste:=xlPasteValues
            .PasteSpecial Paste:=xlPasteFormats
            .Application.CutCopyMode = False
        End With

Solution 2

With Sheets("Base").Range("b65536")
.End(xlUp)(2) = Range("A2")
.End(xlUp).Interior.ColorIndex = Range("A2").Interior.ColorIndex
.End(xlUp).Font.ColorIndex = Range("A2").Font.ColorIndex
End With

Amicalement

Dan

re,

Ta 1ère solution me va très bien,

merci Dan

à+.....Claude.

Rechercher des sujets similaires à "vba collage special valeur format"