slectionner une ligne d'après la cellule selectionnée

olhey

XLDnaute Occasionnel
Bonjour, j'aimerias que l'orsque que la cellule est sélectionnée , toute la ligne se sélectionne...

Code:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) 'atteindre l'ouvrage en double cliquant
  If Not Intersect([D34:BR69], Target) Is Nothing And Target <> "" Then
    Set p = Application.Index([Base], , 1).Find(What:=Target, LookAt:=xlWhole)
    If Not p Is Nothing Then
      Application.Goto p
    End If
  End If
  Cancel = True
  
End Sub

Merci
 

Pierrot93

XLDnaute Barbatruc
Re : slectionner une ligne d'après la cellule selectionnée

Bonjour Olhey

modifie peut être ainsi :

Code:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) 'atteindre l'ouvrage en double cliquant
  If Not Intersect([D34:BR69], Target) Is Nothing And Target <> "" Then
    Set p = Application.Index([Base], , 1).Find(What:=Target, LookAt:=xlWhole)
    If Not p Is Nothing Then
      Application.Goto p
p.EntireRow.Select
    End If
  End If
  Cancel = True  
End Sub

bonne fin d'après midi
@+
 

Discussions similaires

Réponses
2
Affichages
161

Statistiques des forums

Discussions
312 576
Messages
2 089 836
Membres
104 287
dernier inscrit
kahinaaittouares@hotmail.