Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Dim Plage As Range, Cel As Range
Dim ValidOkE As Boolean, ValidOkS As Boolean
On Error Resume Next
With ActiveCell.Validation
ValidOkE = .Formula1 = '=Entrées'
ValidOkS = .Formula1 = '=Sorties'
End With
On Error GoTo 0
If Len(ActiveCell.Value) = 0 Or (Not ValidOkE And Not ValidOkS) Then Exit Sub
Set Plage = IIf(ValidOkE, [Entrées], [Sorties])
Set Cel = Plage.Find(what:=ActiveCell.Value, LookIn:=xlValues)
Sh.Hyperlinks.Add Anchor:=ActiveCell, Address:=Cel.Hyperlinks(1).Address
ActiveCell.Hyperlinks(1).SubAddress = Cel.Hyperlinks(1).SubAddress
End Sub
Private Sub Workbook_SheetFollowHyperlink(ByVal Sh As Object, ByVal Target As Hyperlink)
Dim D As Long
D = Target.Parent.EntireRow.Range('A1').Value
On Error Resume Next
With ActiveWorkbook.ActiveSheet
.Cells(Application.Match(D, .Columns(1), 0), 1).Activate
End With
End Sub