(Solved) – How to add several hyperlinks in VBA?

  • by

I’m trying to add a conditioned hyperlink in VBA – if one cell shows something (out of four possibilities), then the link is supposed to appear in another cell, on the same sheet, a few columns apart.
“Categorie” is the name of the cell on which content the condition is based.
I’ve done this, but nothing appears on the sheet when I press play. Did I make a mistake ?

    Sub Création_lien()
    If Categorie = "Vocabulaire" Then
    ActiveSheet.Hyperlinks.Add Range("H6"), 
    End If
    End Sub

As I have several answers that correspond to a same content in cell “Categorie”, how can I add several links so they can appear in 9 cells ?
Thank you

Leave a Reply

Your email address will not be published. Required fields are marked *