'Clic sur T0
Sub ShapeT0Click()
Dim Tbl As ListObject
Dim TabDept() As Variant
Dim ShapeName As String
Dim PIC As String
Dim ShapeT0 As String
Dim i As Integer
'Chargement des tableaux en mémoire
Set Tbl = Range("TableauT0").Parent.ListObjects("TableauT0")
TabDept = Tbl.DataBodyRange.Value
ShapeName = Application.Caller
Sheets("Tableau T0").Range("I25") = ShapeName
'Parcours du tableau des PIC
For i = 1 To UBound(TabDept, 1)
ShapeT0 = TabDept(i, 8)
If ShapeT0 = ShapeName Then Exit For
Next i
If i <= UBound(TabDept) Then
Load USF_T0
USF_T0.Show
Else
MsgBox "Erreur: la Shape <" & ShapeName & "> ne correspond pas à une T0 !"
End If
End Sub