Macro qui ne fonctionne qu' moitié

Bonjour

Cette macro ne fonctionne que pour la plage A7:L7

Ou se trouve mon erreur?

Merci

Sub Macro1()
'
' Macro1 Macro
'

    Range("A5:L5").Select
    Range("A7:L7").Select
    With Selection.Interior
        .Pattern = xlSolid
        .PatternColorIndex = xlAutomatic
        .Color = 65535
        .TintAndShade = 0
        .PatternTintAndShade = 0
    End With
End Sub

Bonjour,

Sub Macro1()
    With Union(Range("A5:L5"), Range("A7:L7")).Interior
        .Pattern = xlSolid
        .PatternColorIndex = xlAutomatic
        .Color = 65535 ' Jaune
        .TintAndShade = 0
        .PatternTintAndShade = 0
    End With
End Sub

Bonjour,

Ou ceci:

Sub Macro1()
    With Range("A5:L5,A7:L7").Interior
        .Pattern = xlSolid
        .PatternColorIndex = xlAutomatic
        .Color = 65535 ' Jaune
        .TintAndShade = 0
        .PatternTintAndShade = 0
    End With
End Sub

Cdlt

Bonjour à tous

Merci pour vos solutions

Bonne journée

Rechercher des sujets similaires à "macro qui fonctionne moitie"