Terminé une macro

wachoo31

XLDnaute Occasionnel
Bonsoir a tout le forum

Je joint un fichier dans lequelle je n'arrive pas a terminé une macro

Qui peux m'aider
 

Pièces jointes

  • nouveau v2.zip
    23.4 KB · Affichages: 26

Hervé

XLDnaute Barbatruc
Re : Terminé une macro

bonjour wachoo

peut etre comme ceci :

PHP:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Dim i&, val_im%


If Not Intersect(Target, Range("b5:az40")) Is Nothing Then
    With Sheets("Listing")
        For i = 5 To .Range("A65536").End(xlUp).Row
            If .Cells(i, 1).Value = Target(1) Then
                UserForm1.TextBox1.Value = .Cells(i, 1)
                UserForm1.TextBox2.Value = .Cells(i, 2)
                UserForm1.TextBox3.Value = .Cells(i, 3)
                UserForm1.TextBox4.Value = .Cells(i, 4)
                UserForm1.Show
                Cancel = True 'pour eviter de passer en mode edition
            End If
        Next i
    End With
End If

End Sub

salut
 

Statistiques des forums

Discussions
312 582
Messages
2 089 953
Membres
104 317
dernier inscrit
UMP