Bonjour!
Merci pour ta réponse, cependant, je suis pas encore un as du VBA et ton code n'avait pas l'air de fonctionner, ou je suppose que c'est moi qui n'ai pas réussi à le faire fonctionner. Je te propose ici le code sur lequel je travaille...
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Application.Intersect(Target, Range("B6:B20000")) Is Nothing Then
Call NomEntreprises
End If
If Not Application.Intersect(Target, Range("C6:C20000")) Is Nothing Then
If Target.Value = "CP" Then
Call ObtenirInfosRéférence
Else Target.Value <> "CP" Then
Call NuméroContrat
End If
End Sub
Si nécessaire, je peux te filer une copie du fichier en question.
Cordialement,
Guillaume
-- 10 Mai 2011, 10:52 --
Ok, ben en fait en me creusant la cervelle, j'ai trouvé:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Application.Intersect(Target, Range("B6:B20000")) Is Nothing Then
Call NomEntreprises
End If
If Not Application.Intersect(Target, Range("C6:C20000")) Is Nothing Then
If ActiveCell.Offset(0, -1).Value = "CP" Then
Call ObtenirInfosRéférence
Else: Call NuméroContrat
End If
End If
End Sub