In Microsoft Excel when have hyperlink normally the text in cell become blue and when we move our cursor on top, it will display the link address which is hidden inside. Therefore some time necessary to get Text to Display and also the hyperlink
address via code or Visual Basic for Applications. Below example will do the job for you. Please try by inserting this code into module, run and feedback to me the result, please don’t forget to put hyperlink into cell A1.
Option Explicit Sub GetHyperlinkAndText() Dim GetText As String Dim GetAddress As String On Error GoTo line1 GetText = Range("A1").Hyperlinks(1).TextToDisplay GetAddress = Range("A1").Hyperlinks(1).Address MsgBox "Your anchor Text = " & GetText & Chr(10) & "Your link = " & GetAddress End line1: MsgBox "Sorry! Link not found." End Sub
If you have any question or project please e-mail to me, I will reply and create