Bonjour,
Dans ce cas on peut tweaker Creation2 (module Creation_modele) en une fonction qui renvoie la nouvelle feuille, comme ceci :
Public Function Creation2(nomFeuil As String) As Worksheet
' verification nom valide
If VBA.Trim$(nomFeuil) = vbNullString Then
nomFeuil = "Séance"
End If
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
If StrComp(ws.Name, nomFeuil, vbTextCompare) = 0 Then
nomFeuil = nomFeuil & Format(Now, "yyyymmdd_hhmmss")
End If
Next ws
' copie de la feuille modele
Application.ScreenUpdating = False
With ThisWorkbook.Worksheets
.Item("Seance").Visible = xlSheetVisible
.Item("Seance").Copy After:=.Item(.Count)
With .Item(.Count)
.Name = nomFeuil
.Visible = xlSheetVisible
.Activate
End With
.Item("Seance").Visible = xlVeryHidden
Set Creation2 = .Item(.Count)
End With
Application.ScreenUpdating = True
End Function
Et ensuite, dans le code de la feuille "Liste des séances", ajouter l'évènement suivant :
Private Sub Worksheet_Change(ByVal Target As Range)
If Application.Intersect(Target, Range("A:A")) Is Nothing Then Exit Sub
If Target.Count > 1 Then Exit Sub
If Target.Value = vbNullString Then Exit Sub
' creation feuille seance
Dim linkSht As Worksheet
Set linkSht = Creation2("Séance_" & Target.Value)
' ajout hyperlien
Target.Hyperlinks.Add _
Anchor:=Target, _
Address:="", _
SubAddress:=linkSht.Range("A1").Address(external:=True)
End Sub
Notez bien : j'ai mis le préfixe "Séance_" que vous pouvez voir ci-dessus. Cependant cela casse vos hyperliens manuels. Vous pouvez le retirer (c'est à dire utiliser Set linkSht = Creation2(Target.Value) ) pour que le nom de feuille soit exactement celui entrée en colonne A.