Private Sub Worksheet_Change(ByVal Target As Range)
'liens vers onglets
If Target.Count > 1 Then Exit Sub
' ----------------------------------------------
If Target.Address = "$B$1" Then
Sheets(Range("B1").Value).Activate
Exit Sub
End If
' ----------------------------------------------
If Not Intersect(Target, Range(Cells(2, 4), Cells(2, Columns.Count).End(xlToLeft))) Is Nothing And Not IsEmpty(Target) Then
Dim sh As Worksheet
On Error Resume Next
Set sh = Sheets(Target.Text)
If Not sh Is Nothing Then
Me.Hyperlinks.Add Anchor:=Target, Address:="", SubAddress:="'" & Target.Text & "'!A1", TextToDisplay:=Target.Text
End If
End If
If Intersect(ActiveCell, Range("B2:B4")) Is Nothing Then Exit Sub
If Range("B2") = "" Or Range("B4") = "" Then Exit Sub
With Sheets("listes")
Set MaDate = .Range("B5:B65536").Find(CLng(.Range("B4").Value), LookIn:=xlValues, lookat:=xlWhole)
If MaDate Is Nothing Then Exit Sub Else lg = MaDate.Row
End With
col = Range("C1:IV1").Find(Range("B2").Value, LookIn:=xlValues, lookat:=xlWhole).Column
ActiveWindow.ScrollRow = lg
ActiveWindow.ScrollColumn = col
End Sub