Ceci est une page optimisée pour les mobiles. Cliquez sur ce texte pour afficher la vraie page.

XL 2019 vba

fanch55

XLDnaute Barbatruc
Salut, la colonne J semble mal remplie .... une cellule est restée vide entre 2 autres ..

Sinon, vous pouvez simplifier le code de la feuille Pilote :
VB:
Private Sub Worksheet_Activate()
    Dim sh As Shape
        
    Application.ScreenUpdating = False
    For Each sh In Me.Shapes
        sh.Delete
    Next
    For Each sh In Feuil27.Shapes
        If sh.TopLeftCell.Column = 4 Then
            If Not IsError(Application.Match(Feuil27.Range("B" & sh.TopLeftCell.Row), Me.Range("B4:B24"), 0)) Then
                sh.Copy
                Me.Range("A3").Offset(Application.Match(Feuil27.Range("B" & sh.TopLeftCell.Row), Me.Range("B4:B24"), 0), 0).PasteSpecial
                Selection.Height = Selection.TopLeftCell.Height
            End If
        End If
    Next
    Application.ScreenUpdating = True
End Sub
 
Dernière édition:
Les cookies sont requis pour utiliser ce site. Vous devez les accepter pour continuer à utiliser le site. En savoir plus…