Re : Lien hypertexte en VBA
Encore merci
.
J'ai une dernière manip à ajouter ! Dans la USF, j'ai ajouté des options boutons...
Je voudrais que le choix que je fais quand je clique sur les boutons, s'inscrive dans ma feuille fiche athlète en colonne 3 et 4.
J'ai rajouté ces lignes dans mon code mais ça ne marche pas :
'Fîche nouvel athlète
Private Sub CommandButton1_Click()
Dim Dl1 As Long
Sheets("1").Copy After:=Sheets(Sheets.Count)
ActiveSheet.Name = Application.Proper(TextBox1.Value)
With Sheets("Fiche athlète")
Dl1 = .Range("A65530").End(xlUp).Row + 1
.Range("A" & Dl1) = TextBox1.Value
.Range("A" & Dl1).Offset(0, 1) = Format(TextBox2.Value, "dd/mm/yyyy")
.Range("E" & Dl1) = TextBox3.Value
ActiveSheet.Hyperlinks.Add Anchor:=.Range("A" & Dl1), Address:="", SubAddress:="'" & TextBox1.Value & "'!A1"
ActiveSheet.Cells(3, 1) = Application.Proper(TextBox3.Value)
ActiveSheet.Cells(1, 1) = Application.Proper(TextBox1.Value)
ActiveSheet.Cells(2, 1) = Format(TextBox2.Value, "dd/mm/yyyy")
.Columns(1).HorizontalAlignment = xlCenter
If Controls("OptionButton1").Value = True Then Cells(Dl1, 3).Value = "Cadet"
If Controls("OptionButton2").Value = True Then Cells(Dl1, 3).Value = "Junior"
If Controls("OptionButton3").Value = True Then Cells(Dl1, 4).Value = "Avant"
If Controls("OptionButton4").Value = True Then Cells(Dl1, 4).Value = "Meneur"
If Controls("OptionButton5").Value = True Then Cells(Dl1, 4).Value = "Trois/Quart"
End With
Unload Me
Sheets("Fiche athlète").Select
End Sub