Search code examples
excelhyperlinkribbonexcel-addinsvba

How to add a Hyperlink to a tab in Excel?


I want to add a hyperlink to a Tab in Excel. Actually I want to do it as an Excel Add in? But now it seems there is not option for it by customizing ribbon directly. I know there is document location with a drop down list. But I want a link to a URL. From what I know hyperlinks can be placed on cells only. Please give me some ideas.


Solution

  • What is a hyperlink, really? Its a text "button" that, when clicked, brings you to a website or opens a link of some sort. So in this case, use a button in a tab on the Excel ribbon that when clicked brings you to a website. Easy:

    Private Sub MyRibbonButton_Click(Byval sender as Object, Byval e as EventArgs) Handles MyRibbonButton.Click
    
    System.Diagnostics.Process.Start("my website url")
    
    End Sub
    

    Does it look like a button? Of course, but essentially it's just a hyperlink, right?